#!usr/bin/env python3 from collections import defaultdict,deque from heapq import heappush, heappop import sys import math import bisect import random def LI(): return [int(x) for x in sys.stdin.readline().split()] def I(): return int(sys.stdin.readline()) def LS():return [list(x) for x in sys.stdin.readline().split()] def S(): return list(sys.stdin.readline())[:-1] def IR(n): return [I() for i in range(n)] def LIR(n): return [LI() for i in range(n)] def SR(n): return [S() for i in range(n)] def LSR(n): return [LS() for i in range(n)] sys.setrecursionlimit(1000000) mod = 1000000007 #A def A(): try: n = I() a = IR(n) l = [] for i in range(n): for j in range(i): l.append(a[i]+a[j]) l = list(set(l)) l.sort() l = l[::-1] print(l[1]) except: print('"assert"') return #B def B(): n = I() return #C def C(): h,w = LI() ans = max(0,h-w)+w*(w+1)//2 print(ans) return #D def D(): n = I() return #E def E(): n = I() return #F def F(): n = I() return #Solve if __name__ == "__main__": C()