若x,y∈R,设M=x2-2xy+3y2-x+y,则M的最小值为______.