Condition to get the maximum x that satisfies the criteria
if ( x - sum >= 1 ) : NEW_LINE INDENT p = mid NEW_LINE low = mid + 1 NEW_LINE DEDENT else : NEW_LINE INDENT high = mid - 1 NEW_LINE DEDENT start , end , y , q = 1 , 10 ** 4 , 1 , 0 NEW_LINE