#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cstdlib>
#include<queue>
#include<set>
#include<cstdio>

using namespace std;

#define ll long long
#define rep(i, n) for(int i = 0; i < n; i++)
#define P pair<int, int>

typedef vector<int> vec;
typedef vector<vec> mat;

const ll mod = 1000000007;

mat mul(mat &A, mat &B){
    mat C(A.size(), vec(B[0].size()));
    for (int i = 0; i < A.size(); i++){
        for (int k = 0; k < B.size(); k++){
            for (int j = 0; j < B[0].size(); j++){
                C[i][j] = (C[i][j] + A[i][k] * B[k][j]) % mod;
            }
        }
    }
    return C;
}

mat pow(mat A, ll n){
    mat B(A.size(), vec(A.size()));
    for (int i = 0; i < A.size(); i++){
        B[i][i] = 1;
    }
    while(n > 0){
        if(n & 1) B = mul(B, A);
        A = mul(A, A);
        n >>= 1;
    }
    return B;
}

int main(){
    int n, l;
    cin >> n >> l;
    int sm = 0;
    int ans = 1000000;
    rep(i, n){
        sm += l + i;
    }
    // cout << sm << endl;
    rep(i, n){
        int sm_ = 0;
        rep(j, n){
            if(i == j) continue;
            sm_ += l + j;
        }
        if(abs(ans - sm) > abs(sm_ - sm)) ans = sm_;
    }
    cout << ans << endl;
}
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fastio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) ((a)*(b))/gcd((a),(b))
const int maxn = 1e9 + 5;
#define INF 100000000000
const int MOD = 1e9+7;
const double PI = 3.14159265358979323846264338;
const ll MAXN = 1e18;



int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	fastio
	int a,b;
	cin >> a >> b;
	int l = b;
	int r = b+a-1;
	int eat = 0;
	if(r<=0){
		eat = r;
	}else if(l>=0){
		eat=l;
	}else{
		eat=0;
	}
	int ans = ((r+l)*(r-l+1)/2)-eat;
	cout << ans << endl;
	return 0;
}
//l,l+1,l+2 ... l+n-1
//^-^