import sequtils,strutils var N, K, ans, n : int64 (N, K) = stdin.readline.split.map(parseBiggestInt) n = N - K + 1 ans = 1 + N * (N + 1) div 2 - (n * (n - 1) div 2) echo ans