Using the compound interest formula