answer is 4000002000000. used iterative method