import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = b;
		int sum = b;
		for(int i = 1; i < a; i++){
		    int cost = b + i;
		    sum += cost;
		    if(post(ans) > post(cost)){
		        ans = cost;
		    }
		}
		System.out.println(sum - ans);
	}
	
	public static int post(int a){
	    if(a < 0){
	        return -a;
	    }else{
	        return a;
	    }
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = b;
		int sum = b;
		for(int i = 1; i < a; i++){
		    int cost = b + i;
		    sum += cost;
		    if(post(ans) > post(cost)){
		        ans = cost;
		    }
		}
		System.out.println(sum - ans);
	}
	
	public static int post(int a){
	    if(a < 0){
	        return -a;
	    }else{
	        return a;
	    }
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = b;
		int sum = b;
		for(int i = 1; i < a; i++){
		    int cost = b + i;
		    sum += cost;
		    if(post(ans) > post(cost)){
		        ans = cost;
		    }
		}
		System.out.println(sum - ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = b;
		int sum = b;
		for(int i = 1; i < a; i++){
		    int cost = b + i;
		    sum += cost;
		    if(post(ans) > post(cost)){
		        ans = cost;
		    }
		}
		System.out.println(sum - ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int ans = b; ans b int sum = b; sum b for(int i = 1; i < a; i++){
		    int cost = b + i;
		    sum += cost;
		    if(post(ans) > post(cost)){
		        ans = cost;
		    }
		} int i = 1; int i = 1; i 1 i < a i a i++ i++ i {
		    int cost = b + i;
		    sum += cost;
		    if(post(ans) > post(cost)){
		        ans = cost;
		    }
		} {
		    int cost = b + i;
		    sum += cost;
		    if(post(ans) > post(cost)){
		        ans = cost;
		    }
		} int cost = b + i; cost b + i b i sum += cost sum cost if(post(ans) > post(cost)){
		        ans = cost;
		    } post(ans) > post(cost) post(ans) post ans post(cost) post cost {
		        ans = cost;
		    } ans = cost ans cost System.out.println(sum - ans) System.out.println System.out System System.out sum - ans sum ans String[] args args public static int post(int a){
	    if(a < 0){
	        return -a;
	    }else{
	        return a;
	    }
	} post {
	    if(a < 0){
	        return -a;
	    }else{
	        return a;
	    }
	} if(a < 0){
	        return -a;
	    }else{
	        return a;
	    } a < 0 a 0 {
	        return -a;
	    } return -a; -a a {
	        return a;
	    } return a; a int a a public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = b;
		int sum = b;
		for(int i = 1; i < a; i++){
		    int cost = b + i;
		    sum += cost;
		    if(post(ans) > post(cost)){
		        ans = cost;
		    }
		}
		System.out.println(sum - ans);
	}
	
	public static int post(int a){
	    if(a < 0){
	        return -a;
	    }else{
	        return a;
	    }
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = b;
		int sum = b;
		for(int i = 1; i < a; i++){
		    int cost = b + i;
		    sum += cost;
		    if(post(ans) > post(cost)){
		        ans = cost;
		    }
		}
		System.out.println(sum - ans);
	}
	
	public static int post(int a){
	    if(a < 0){
	        return -a;
	    }else{
	        return a;
	    }
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = b;
		int sum = b;
		for(int i = 1; i < a; i++){
		    int cost = b + i;
		    sum += cost;
		    if(post(ans) > post(cost)){
		        ans = cost;
		    }
		}
		System.out.println(sum - ans);
	}
	
	public static int post(int a){
	    if(a < 0){
	        return -a;
	    }else{
	        return a;
	    }
	}
}