If closing bracket
else : NEW_LINE INDENT if ( d == 1 ) : NEW_LINE INDENT j = 2 NEW_LINE while ( j <= n // 2 + 1 and arr [ j ] != 0 ) : NEW_LINE INDENT arr [ j ] = 0 NEW_LINE DEDENT DEDENT ans += 1 ; NEW_LINE ans += arr [ d ] ; NEW_LINE arr [ d ] += 1 ; NEW_LINE d -= 1 ; NEW_LINE DEDENT