A uniform half metre is freely pivoted at 15cm mark and it balances horizontally when a body of mass 40g is hung from a 2cm mark. Calculate the mass of the rule.