A person purchases 90 clocks and sells 40 clocks at a gain of 10% and 50 clocks at a gain of 20%. If he sold all of them at a uniform profit of 15%, then he would have got Rs. 40 less. The cost price of each clock is: