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 c = 0;
        for(int i=0;i<a;i++){c+=b+i;
                            }
        if(b*(b+a-1)>0){if(b>0){c-=b;}else{c-=b+a-1;}}
		System.out.println(c);
	}
} 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 c = 0;
        for(int i=0;i<a;i++){c+=b+i;
                            }
        if(b*(b+a-1)>0){if(b>0){c-=b;}else{c-=b+a-1;}}
		System.out.println(c);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();		
        int b = sc.nextInt();
		int c = 0;
        for(int i=0;i<a;i++){c+=b+i;
                            }
        if(b*(b+a-1)>0){if(b>0){c-=b;}else{c-=b+a-1;}}
		System.out.println(c);
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();		
        int b = sc.nextInt();
		int c = 0;
        for(int i=0;i<a;i++){c+=b+i;
                            }
        if(b*(b+a-1)>0){if(b>0){c-=b;}else{c-=b+a-1;}}
		System.out.println(c);
	} 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 c = 0; c 0 for(int i=0;i<a;i++){c+=b+i;
                            } int i=0; int i=0; i 0 i<a i a i++ i++ i {c+=b+i;
                            } {c+=b+i;
                            } c+=b+i c b+i b i if(b*(b+a-1)>0){if(b>0){c-=b;}else{c-=b+a-1;}} b*(b+a-1)>0 b*(b+a-1) b (b+a-1) b+a b a 1 0 {if(b>0){c-=b;}else{c-=b+a-1;}} if(b>0){c-=b;}else{c-=b+a-1;} b>0 b 0 {c-=b;} c-=b c b {c-=b+a-1;} c-=b+a-1 c b+a-1 b+a b a 1 System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();		
        int b = sc.nextInt();
		int c = 0;
        for(int i=0;i<a;i++){c+=b+i;
                            }
        if(b*(b+a-1)>0){if(b>0){c-=b;}else{c-=b+a-1;}}
		System.out.println(c);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();		
        int b = sc.nextInt();
		int c = 0;
        for(int i=0;i<a;i++){c+=b+i;
                            }
        if(b*(b+a-1)>0){if(b>0){c-=b;}else{c-=b+a-1;}}
		System.out.println(c);
	}
} 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 c = 0;
        for(int i=0;i<a;i++){c+=b+i;
                            }
        if(b*(b+a-1)>0){if(b>0){c-=b;}else{c-=b+a-1;}}
		System.out.println(c);
	}
}
