A man decided to place some flowers on three different temples. There is a magical pond before each temple and he has to swim through each one. So his trip will be:
[ pond1 - temple1 - pond2 - temple2 -pond3 - temple3 ]
The fact about magical ponds is that if anyone swims across the pond with flowers, the number of flowers will be doubled.
He buys some flowers and goes for his trip to the three temples.
At the end of trip, he has no flowers remaining and he has placed an equal number of flowers at all three temples.
How many flowers did he buy and how many did he place at each temple?