p02994 AtCoder Beginner Contest 131 - Bite Eating_9770
You have N apples, called Apple 1, Apple 2, Apple 3, ..., Apple N. The flavor of Apple i is L+i-1, which can be negative.

You can make an apple pie using one or more of the apples. The flavor of the apple pie will be the sum of the flavors of the apples used.

You planned to make an apple pie using all of the apples, but being hungry tempts you to eat one of them, which can no longer be used to make the apple pie.

You want to make an apple pie that is as similar as possible to the one that you planned to make. Thus, you will choose the apple to eat so that the flavor of the apple pie made of the remaining N-1 apples will have the smallest possible absolute difference from the flavor of the apple pie made of all the N apples.

Find the flavor of the apple pie made of the remaining N-1 apples when you choose the apple to eat as above.

We can prove that this value is uniquely determined.

Constraints

* 2 \leq N \leq 200
* -100 \leq L \leq 100
* All values in input are integers.

Input

Input is given from Standard Input in the following format:


N L


Output

Find the flavor of the apple pie made of the remaining N-1 apples when you optimally choose the apple to eat.

Examples

Input

5 2


Output

18


Input

3 -1


Output

0


Input

30 -50


Output

-1044


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);
			
		}
		}
	 
	


5 2 30 -50 3 -1 5 4 13 -50 3 -2 5 7 16 -50 5 -2 5 9 23 -50 4 -2 8 9 5 -50 4 -1 8 11 5 -29 5 -1 8 7 10 -2 15 7 15 13 15 2 13 -8 15 4 8 -4 15 8 8 -1 3 8 14 -2 23 -2 2 -1 4 0 2 2 18 -50 9 9 9 -50 2 -50 6 9 3 -50 8 0 8 16 5 -43 8 -2 10 11 5 -6 2 0 11 7 13 -2 14 -4 15 14 13 -5 7 2 10 -5 20 4 4 -4 4 8 16 -1 14 -3 23 0 4 1 3 2 18 -93 9 1 16 -88 12 7 12 9 6 0 5 16 5 -16 10 10 17 7 9 0 3 14 13 0 7 3 38 4 3 9 23 1 10 1 18 -124 13 -88 12 14 12 11 5 -23 2 -7 10 5 17 6 12 0 10 -6 6 14 26 0 7 1 38 1 19 1 24 -3 5 1 33 -124 3 -88 11 14 12 6 4 27 8 -3
18 -1044 0 26
 -534
 -3
 38
 -645
 0
 46
 -869
 -2
 91
 -194
 2
 105
 -110
 5
 77
 25
 203
 287
 133
 -26
 161
 -4
 217
 20
 19
 63
 207
 -1
 6
 3
 -714
 108
 -372
 -50
 60
 -99
 28
 140
 -166
 12
 144
 -18
 1
 125
 52
 35
 301
 13
 33
 -5
 266
 -9
 30
 104
 49
 253
 9
 7
 -1445
 44
 -1215
 143
 165
 15
 74
 -58
 135
 248
 36
 31
 78
 39
 851
 21
 275
 54
 -1972
 -990
 220
 187
 -86
 -7
 90
 232
 66
 -15
 85
 325
 27
 740
 189
 204
 14
 -3472
 -175
 195
 132
 87
 4
