from collections import * from itertools import * from functools import * from heapq import * import math,sys input = sys.stdin.readline N,K = map(int,input().split()) A = [i+1 for i in range(N)] S = list(accumulate([0]+A)) if S[-1]==K: print(0) exit() SN = N*(N+1)//2 for i in range(N): if S[-1]-S[i]1: mid = (y+x)//2 if S[mid]-S[i]