Calculating compound interest after a certain number of years