#include <bits/stdc++.h>
using namespace std;
int dp[110][110];
int main() {
  int n, v;
  cin >> n >> v;
  for (int i = 1; i <= v; i++) dp[1][i] = i;
  for (int i = 2; i <= n; i++) {
    for (int j = 0; j < v; j++) {
      dp[i][j] = min(dp[i - 1][j + 1], dp[i - 1][j] + i);
    }
    dp[i][v] = dp[i - 1][v] + i;
  }
  int ans = 1000000000;
  for (int i = 0; i < v + 1; i++) ans = min(ans, dp[n][i]);
  cout << ans;
  return 0;
}
