Bob invests X in an account that pays interest at an annual effective rate of 8%. Ten years later, he withdraws X. Ten years after that, he withdraws 1,000, which exhausts the account. Calculate X.