Initially, the numbers of coins with A and C are in the ratio 3 : 5, while B has no coins. A gives one-third of their coins to B, and C gives B three coins fewer than one-fourth of their own coins. The resulting ratio of coins with A and B is 9 : 10. Find the initial total number of coins with A and C.