#include using namespace std; int main(){ long long n,k;cin>>n>>k; cout << n*(n+1)/2 - (n-k)*(n-k+1)/2 + 1 << endl; }