A man buys oranges at Rs 5 a dozen and an equal number at Rs 4 a dozen. He sells them at Rs5.50 a dozen and makes a profit of Rs50. How many oranges does he buy?