A man buys a number of pens for Rs. 180 . If he had bought 3 more pens for the same amount, each pen would have cost him Rs. 3 less. How many pens did he buy?