#include <bits/stdc++.h>
using namespace std;

int main(){
    int N, L;
    cin >> N >> L;
    int ans = N*L + (N*(N-1))/2;
    int d = 0;
    if(L + N - 1< 0) d = L + N -1;
    if(L > 0) d = L;
    cout << ans - d << endl; 
}