A magnetic dipole of magnetic moment M is rotated through 360o in a magnetic field B. The work done is