from sys import stdin input=lambda :stdin.readline()[:-1] memo={} def calc(y,x,a): if y==0: return x if y in memo: return memo[y] ans=abs(y-x) tmpL,tmpR=y,y+1 res=0 while tmpL