When a sum of money is invested for a period of nine years at an interest rate of 7% per annum, the difference between the interest earned if calculated using the compound interest method (compounded annually) and the simple interest method is R334.16. What was the capital sum of the money invested?