What's the total cost of every TH level combined?

Solution 1:

It takes 40,630,000 gold to max out the Town Hall and 10,233,500 to max out the Builder Hall.