principal amount calculate