#include #define rep(i,n) for(int i=0;i ; const int INF = 1e9; const int MOD = 1000000007; int main(){ ll n,k; cin >> n >> k; if(k==0){ cout << 1 << endl; return 0; }else{ cout << 1 + n*k - k*(k-1)/2 << endl; } return 0; }