#include #include using namespace std; typedef long long ll; int main(){ ll H,W; cin >> H >> W; if(H==0){ cout << 0 << endl; return 0; } cout << (H+1)*(2*W-H)/2 + max(H-W+1,0LL) << endl; }