A block of mass M placed on a frictionless horizontal table is pulled by another block of mass m hanging vertically by a massless string passing over a frictionless pulley. The tension in the string is :