import java.util.*;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {

	    Scanner scanner = new Scanner(System.in);
	    int line1 = scanner.nextInt();
	    int line2 = scanner.nextInt();
	    int minNum = line2;
	    int azi = 0;
	    boolean flg = false;
	    for (int i = 0; i < line1; i++) {
	    	if (minNum < 0) {
		    	minNum = Math.max(minNum, line2);	    		
	    	} else {
		    	minNum = Math.min(minNum, line2);	
	    	}
	    	azi = azi + line2;
	    	if (line2 == 0) {
	    		flg = true;
	    	}
	    	line2++;
	    }
	    if (flg) {
		    System.out.println(azi);	
	    } else {
	    	System.out.println(azi - minNum);
	    }
    }
} import java.util.*; util.* java import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {

	    Scanner scanner = new Scanner(System.in);
	    int line1 = scanner.nextInt();
	    int line2 = scanner.nextInt();
	    int minNum = line2;
	    int azi = 0;
	    boolean flg = false;
	    for (int i = 0; i < line1; i++) {
	    	if (minNum < 0) {
		    	minNum = Math.max(minNum, line2);	    		
	    	} else {
		    	minNum = Math.min(minNum, line2);	
	    	}
	    	azi = azi + line2;
	    	if (line2 == 0) {
	    		flg = true;
	    	}
	    	line2++;
	    }
	    if (flg) {
		    System.out.println(azi);	
	    } else {
	    	System.out.println(azi - minNum);
	    }
    }
} Main public static void main(String[] args) throws Exception {

	    Scanner scanner = new Scanner(System.in);
	    int line1 = scanner.nextInt();
	    int line2 = scanner.nextInt();
	    int minNum = line2;
	    int azi = 0;
	    boolean flg = false;
	    for (int i = 0; i < line1; i++) {
	    	if (minNum < 0) {
		    	minNum = Math.max(minNum, line2);	    		
	    	} else {
		    	minNum = Math.min(minNum, line2);	
	    	}
	    	azi = azi + line2;
	    	if (line2 == 0) {
	    		flg = true;
	    	}
	    	line2++;
	    }
	    if (flg) {
		    System.out.println(azi);	
	    } else {
	    	System.out.println(azi - minNum);
	    }
    } main {

	    Scanner scanner = new Scanner(System.in);
	    int line1 = scanner.nextInt();
	    int line2 = scanner.nextInt();
	    int minNum = line2;
	    int azi = 0;
	    boolean flg = false;
	    for (int i = 0; i < line1; i++) {
	    	if (minNum < 0) {
		    	minNum = Math.max(minNum, line2);	    		
	    	} else {
		    	minNum = Math.min(minNum, line2);	
	    	}
	    	azi = azi + line2;
	    	if (line2 == 0) {
	    		flg = true;
	    	}
	    	line2++;
	    }
	    if (flg) {
		    System.out.println(azi);	
	    } else {
	    	System.out.println(azi - minNum);
	    }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int line1 = scanner.nextInt(); line1 scanner.nextInt() scanner.nextInt scanner int line2 = scanner.nextInt(); line2 scanner.nextInt() scanner.nextInt scanner int minNum = line2; minNum line2 int azi = 0; azi 0 boolean flg = false; flg false for (int i = 0; i < line1; i++) {
	    	if (minNum < 0) {
		    	minNum = Math.max(minNum, line2);	    		
	    	} else {
		    	minNum = Math.min(minNum, line2);	
	    	}
	    	azi = azi + line2;
	    	if (line2 == 0) {
	    		flg = true;
	    	}
	    	line2++;
	    } int i = 0; int i = 0; i 0 i < line1 i line1 i++ i++ i {
	    	if (minNum < 0) {
		    	minNum = Math.max(minNum, line2);	    		
	    	} else {
		    	minNum = Math.min(minNum, line2);	
	    	}
	    	azi = azi + line2;
	    	if (line2 == 0) {
	    		flg = true;
	    	}
	    	line2++;
	    } {
	    	if (minNum < 0) {
		    	minNum = Math.max(minNum, line2);	    		
	    	} else {
		    	minNum = Math.min(minNum, line2);	
	    	}
	    	azi = azi + line2;
	    	if (line2 == 0) {
	    		flg = true;
	    	}
	    	line2++;
	    } if (minNum < 0) {
		    	minNum = Math.max(minNum, line2);	    		
	    	} else {
		    	minNum = Math.min(minNum, line2);	
	    	} minNum < 0 minNum 0 {
		    	minNum = Math.max(minNum, line2);	    		
	    	} minNum = Math.max(minNum, line2) minNum Math.max(minNum, line2) Math.max Math minNum line2 {
		    	minNum = Math.min(minNum, line2);	
	    	} minNum = Math.min(minNum, line2) minNum Math.min(minNum, line2) Math.min Math minNum line2 azi = azi + line2 azi azi + line2 azi line2 if (line2 == 0) {
	    		flg = true;
	    	} line2 == 0 line2 0 {
	    		flg = true;
	    	} flg = true flg true line2++ line2 if (flg) {
		    System.out.println(azi);	
	    } else {
	    	System.out.println(azi - minNum);
	    } flg {
		    System.out.println(azi);	
	    } System.out.println(azi) System.out.println System.out System System.out azi {
	    	System.out.println(azi - minNum);
	    } System.out.println(azi - minNum) System.out.println System.out System System.out azi - minNum azi minNum String[] args args public class Main {
    public static void main(String[] args) throws Exception {

	    Scanner scanner = new Scanner(System.in);
	    int line1 = scanner.nextInt();
	    int line2 = scanner.nextInt();
	    int minNum = line2;
	    int azi = 0;
	    boolean flg = false;
	    for (int i = 0; i < line1; i++) {
	    	if (minNum < 0) {
		    	minNum = Math.max(minNum, line2);	    		
	    	} else {
		    	minNum = Math.min(minNum, line2);	
	    	}
	    	azi = azi + line2;
	    	if (line2 == 0) {
	    		flg = true;
	    	}
	    	line2++;
	    }
	    if (flg) {
		    System.out.println(azi);	
	    } else {
	    	System.out.println(azi - minNum);
	    }
    }
} public class Main {
    public static void main(String[] args) throws Exception {

	    Scanner scanner = new Scanner(System.in);
	    int line1 = scanner.nextInt();
	    int line2 = scanner.nextInt();
	    int minNum = line2;
	    int azi = 0;
	    boolean flg = false;
	    for (int i = 0; i < line1; i++) {
	    	if (minNum < 0) {
		    	minNum = Math.max(minNum, line2);	    		
	    	} else {
		    	minNum = Math.min(minNum, line2);	
	    	}
	    	azi = azi + line2;
	    	if (line2 == 0) {
	    		flg = true;
	    	}
	    	line2++;
	    }
	    if (flg) {
		    System.out.println(azi);	
	    } else {
	    	System.out.println(azi - minNum);
	    }
    }
} Main
import java.util.*;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {

	    Scanner scanner = new Scanner(System.in);
	    int line1 = scanner.nextInt();
	    int line2 = scanner.nextInt();
	    int minNum = line2;
	    int azi = 0;
	    boolean flg = false;
	    for (int i = 0; i < line1; i++) {
	    	if (minNum < 0) {
		    	minNum = Math.max(minNum, line2);	    		
	    	} else {
		    	minNum = Math.min(minNum, line2);	
	    	}
	    	azi = azi + line2;
	    	if (line2 == 0) {
	    		flg = true;
	    	}
	    	line2++;
	    }
	    if (flg) {
		    System.out.println(azi);	
	    } else {
	    	System.out.println(azi - minNum);
	    }
    }
}