the 2% must be the annual interest rate!!!
otherwise, you will never finish returning the money!
because 400/2% = 20000 < 40000
20000 is when N -> +OO, the limit of principle that you have returned.
so suppose 2% is annual interest rate, the real rate is 2%/12 = 0.833%
N is the number of returning years
the formula is 400 * (1-q^N) / (1-q) = 40000 * q ^ (12*N) where q = 1+0.833%