For a line segment AB, one endpoint is A(3, 1), and the midpoint is M(0,3). Find the coordinates of endpoint B.