Karim has 40% more stamps than Rahim, if he gives 45 of his stamps to Rahim, then Rahim will have 10% more stamps than Karim. How many stamps did Karim begin with?