#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, v;
  cin >> n >> v;
  int ans = 0;
  if (n < v) {
    cout << n - 1 << endl;
    return 0;
  }
  ans += v;
  int k = n - 1;
  if (ans + 1 == k)
    ans += 2;
  else if (ans != k) {
    int kkk = (((k - ans) + 2 + 1) * (k - ans) / 2);
    ans += kkk;
  }
  cout << ans << endl;
}
