output_description: If the depth of the snow cover is x meters, print x as an integer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      a b
attempt: #!usr/bin/env python3
  from collections import defaultdict
  from collections import deque
  from heapq import heappush, heappop
  import sys
  import math
  import bisect
  import random
  import itertools
  sys.setrecursionlimit(10**5)
  stdin = sys.stdin
  def LI(): return list(map(int, stdin.readline().split()))
  def LF(): return list(map(float, stdin.readline().split()))
  def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
  def II(): return int(stdin.readline())
  def IF(): return float(stdin.readline())
  def LS(): return list(map(list, stdin.readline().split()))
  def S(): return list(stdin.readline().rstrip())
  def IR(n): return [II() for _ in range(n)]
  def LIR(n): return [LI() for _ in range(n)]
  def FR(n): return [IF() for _ in range(n)]
  def LFR(n): return [LI() for _ in range(n)]
  def LIR_(n): return [LI_() for _ in range(n)]
  def SR(n): return [S() for _ in range(n)]
  def LSR(n): return [LS() for _ in range(n)]
  mod = 1000000007
  inf = float("INF")
  
  #A
  def A():
      n = II()
      if n < 1000:
          print("ABC")
      else:
          print("ABD")
      return
  
  #B
  def B():
      a, b = LI()
      x = b - a - 1
      print(a - (1 + x) * x // 2)
      return
  
  #C
  def C():
      n = II()
      dp = [inf for i in range(n + 1)]
      ans = [1]
      x = 6
      while x <= n:
          ans.append(x)
          x = x * 6
      x = 9
      while x <= n:
          ans.append(x)
          x = x * 9
      ans.sort()
      for i in ans:
          dp[i] = 1
      for i in range(1, n + 1):
          if not i in ans:
              a = bisect.bisect_left(ans, i)
              for k in range(a):
                  dp[i] = min(dp[i - ans[k]] + 1, dp[i])
      print(dp[n])
      return
  
  #D
  def D():
      n, c = LI()
      D = LIR(c)
      C = LIR_(n)
      CL = list(itertools.permutations(range(c), 3))
      ans = inf
      amari0 = [0 for i in range(30)]
      amari1 = amari0[::1]
      amari2 = amari0[::1]
      for y in range(n):
          for x in range(n):
              amari = (x + y) % 3
              if amari == 0:
                  amari0[C[y][x]] += 1
              if amari == 1:
                  amari1[C[y][x]] += 1
              if amari == 2:
                  amari2[C[y][x]] += 1
      for c0, c1, c2 in CL:
          ansb = 0
          for i in range(c):
              ansb += D[i][c0] * amari0[i]
              ansb += D[i][c1] * amari1[i]
              ansb += D[i][c2] * amari2[i]
          ans = min(ans, ansb)
      print(ans)
      return
  
  #Solve
  if __name__ == '__main__':
      Ⓑ()
  
problem_description: Statement
  
  In some village, there are 999 towers that are
  1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at
  intervals of 1 meter.
  
  It had been snowing for a while before it finally stopped. For some two
  adjacent towers located 1 meter apart, we measured the lengths of the parts of
  those towers that are not covered with snow, and the results are a meters for
  the west tower, and b meters for the east tower.
  
  Assuming that the depth of snow cover and the altitude are the same everywhere
  in the village, find the amount of the snow cover.
  
  Assume also that the depth of the snow cover is always at least 1 meter.
samples: [{"input": "8 13", "output": "2\n    \n\nThe heights of the two towers are 10 meters and 15 meters, respectively. Thus,\nwe can see that the depth of the snow cover is 2 meters.\n\n* * *"}, {"input": "54 65", "output": "1"}]