Rihaan got lots of candies on his birthday. He got 2 packets having ten thousand candies, 5 packets having a thousand candies, 9 packets having a hundred candies, 6 packets having ten candies and a packet having four candies. How many candies did he get on his birthday?