If the block is pulled by a force F which is always tangential to the surface then, the work done by this force between A and B is