here we remove the 2 ^ 0 that is 1. All other factors
if ( i == 2 and count == 1 ) : NEW_LINE INDENT curr_sum = 0 NEW_LINE DEDENT curr_term = curr_term * i NEW_LINE curr_sum = curr_sum + curr_term NEW_LINE res = res * curr_sum NEW_LINE