

import java.util.Scanner;

public class Main {


		public static void main(String[] agrs)
		{
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int l = sc.nextInt();
			int a=2;
			int num=0;
			int min=l;
			while(a<=n)
			{
				num=l+a-1;
				if(Math.abs(num)<Math.abs(min))
				{
					min = num;
				}
				++a;
			}
		
			int sum=0;
			int b=1;
			while(b<=n)
			{
				num=l+b-1;
				while(num!=min)
				{
					sum+=num;
					break;
				}
				++b;
			}
			System.out.println(sum);
			
		}
		}
	 
	
 import java.util.Scanner; Scanner java.util public class Main {


		public static void main(String[] agrs)
		{
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int l = sc.nextInt();
			int a=2;
			int num=0;
			int min=l;
			while(a<=n)
			{
				num=l+a-1;
				if(Math.abs(num)<Math.abs(min))
				{
					min = num;
				}
				++a;
			}
		
			int sum=0;
			int b=1;
			while(b<=n)
			{
				num=l+b-1;
				while(num!=min)
				{
					sum+=num;
					break;
				}
				++b;
			}
			System.out.println(sum);
			
		}
		} Main public static void main(String[] agrs)
		{
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int l = sc.nextInt();
			int a=2;
			int num=0;
			int min=l;
			while(a<=n)
			{
				num=l+a-1;
				if(Math.abs(num)<Math.abs(min))
				{
					min = num;
				}
				++a;
			}
		
			int sum=0;
			int b=1;
			while(b<=n)
			{
				num=l+b-1;
				while(num!=min)
				{
					sum+=num;
					break;
				}
				++b;
			}
			System.out.println(sum);
			
		} main {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int l = sc.nextInt();
			int a=2;
			int num=0;
			int min=l;
			while(a<=n)
			{
				num=l+a-1;
				if(Math.abs(num)<Math.abs(min))
				{
					min = num;
				}
				++a;
			}
		
			int sum=0;
			int b=1;
			while(b<=n)
			{
				num=l+b-1;
				while(num!=min)
				{
					sum+=num;
					break;
				}
				++b;
			}
			System.out.println(sum);
			
		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int l = sc.nextInt(); l sc.nextInt() sc.nextInt sc int a=2; a 2 int num=0; num 0 int min=l; min l while(a<=n)
			{
				num=l+a-1;
				if(Math.abs(num)<Math.abs(min))
				{
					min = num;
				}
				++a;
			} a<=n a n {
				num=l+a-1;
				if(Math.abs(num)<Math.abs(min))
				{
					min = num;
				}
				++a;
			} num=l+a-1 num l+a-1 l+a l a 1 if(Math.abs(num)<Math.abs(min))
				{
					min = num;
				} Math.abs(num)<Math.abs(min) Math.abs(num) Math.abs Math num Math.abs(min) Math.abs Math min {
					min = num;
				} min = num min num ++a a int sum=0; sum 0 int b=1; b 1 while(b<=n)
			{
				num=l+b-1;
				while(num!=min)
				{
					sum+=num;
					break;
				}
				++b;
			} b<=n b n {
				num=l+b-1;
				while(num!=min)
				{
					sum+=num;
					break;
				}
				++b;
			} num=l+b-1 num l+b-1 l+b l b 1 while(num!=min)
				{
					sum+=num;
					break;
				} num!=min num min {
					sum+=num;
					break;
				} sum+=num sum num break; ++b b System.out.println(sum) System.out.println System.out System System.out sum String[] agrs agrs public class Main {


		public static void main(String[] agrs)
		{
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int l = sc.nextInt();
			int a=2;
			int num=0;
			int min=l;
			while(a<=n)
			{
				num=l+a-1;
				if(Math.abs(num)<Math.abs(min))
				{
					min = num;
				}
				++a;
			}
		
			int sum=0;
			int b=1;
			while(b<=n)
			{
				num=l+b-1;
				while(num!=min)
				{
					sum+=num;
					break;
				}
				++b;
			}
			System.out.println(sum);
			
		}
		} public class Main {


		public static void main(String[] agrs)
		{
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int l = sc.nextInt();
			int a=2;
			int num=0;
			int min=l;
			while(a<=n)
			{
				num=l+a-1;
				if(Math.abs(num)<Math.abs(min))
				{
					min = num;
				}
				++a;
			}
		
			int sum=0;
			int b=1;
			while(b<=n)
			{
				num=l+b-1;
				while(num!=min)
				{
					sum+=num;
					break;
				}
				++b;
			}
			System.out.println(sum);
			
		}
		} Main


import java.util.Scanner;

public class Main {


		public static void main(String[] agrs)
		{
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int l = sc.nextInt();
			int a=2;
			int num=0;
			int min=l;
			while(a<=n)
			{
				num=l+a-1;
				if(Math.abs(num)<Math.abs(min))
				{
					min = num;
				}
				++a;
			}
		
			int sum=0;
			int b=1;
			while(b<=n)
			{
				num=l+b-1;
				while(num!=min)
				{
					sum+=num;
					break;
				}
				++b;
			}
			System.out.println(sum);
			
		}
		}
	 
	

