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