just a comment change
#7

recursive method, find the middle higher and then split the problem to two sub-problem, until the lower boundary is higher than middle, then cacluete the amount