A mass M is attached to a light inextensible string as shown in the figure. Tension in horizontal part of string is