A has some coins. He gives half of the coins and 2 more to B. B gives half of the coins and 2 more to C. C gives half of the coins and 2 more ta D. The number of coins D has now’, is the smallest two-digit number. How many coins does A have in the beginning?