
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int L = scanner.nextInt();

        int absMinTaste = 1000;
        int pieTaste = 0;
        for (int i = 1 ; i <= N ; i++) {
            int taste = L + i - 1;
            pieTaste += taste;
            if (Math.abs(absMinTaste) > Math.abs(taste)) {
                absMinTaste = taste;
            }
        }

        System.out.println(pieTaste - absMinTaste);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int L = scanner.nextInt();

        int absMinTaste = 1000;
        int pieTaste = 0;
        for (int i = 1 ; i <= N ; i++) {
            int taste = L + i - 1;
            pieTaste += taste;
            if (Math.abs(absMinTaste) > Math.abs(taste)) {
                absMinTaste = taste;
            }
        }

        System.out.println(pieTaste - absMinTaste);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int L = scanner.nextInt();

        int absMinTaste = 1000;
        int pieTaste = 0;
        for (int i = 1 ; i <= N ; i++) {
            int taste = L + i - 1;
            pieTaste += taste;
            if (Math.abs(absMinTaste) > Math.abs(taste)) {
                absMinTaste = taste;
            }
        }

        System.out.println(pieTaste - absMinTaste);
    } main {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int L = scanner.nextInt();

        int absMinTaste = 1000;
        int pieTaste = 0;
        for (int i = 1 ; i <= N ; i++) {
            int taste = L + i - 1;
            pieTaste += taste;
            if (Math.abs(absMinTaste) > Math.abs(taste)) {
                absMinTaste = taste;
            }
        }

        System.out.println(pieTaste - absMinTaste);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int L = scanner.nextInt(); L scanner.nextInt() scanner.nextInt scanner int absMinTaste = 1000; absMinTaste 1000 int pieTaste = 0; pieTaste 0 for (int i = 1 ; i <= N ; i++) {
            int taste = L + i - 1;
            pieTaste += taste;
            if (Math.abs(absMinTaste) > Math.abs(taste)) {
                absMinTaste = taste;
            }
        } int i = 1 ; int i = 1 ; i 1 i <= N i N i++ i++ i {
            int taste = L + i - 1;
            pieTaste += taste;
            if (Math.abs(absMinTaste) > Math.abs(taste)) {
                absMinTaste = taste;
            }
        } {
            int taste = L + i - 1;
            pieTaste += taste;
            if (Math.abs(absMinTaste) > Math.abs(taste)) {
                absMinTaste = taste;
            }
        } int taste = L + i - 1; taste L + i - 1 L + i L i 1 pieTaste += taste pieTaste taste if (Math.abs(absMinTaste) > Math.abs(taste)) {
                absMinTaste = taste;
            } Math.abs(absMinTaste) > Math.abs(taste) Math.abs(absMinTaste) Math.abs Math absMinTaste Math.abs(taste) Math.abs Math taste {
                absMinTaste = taste;
            } absMinTaste = taste absMinTaste taste System.out.println(pieTaste - absMinTaste) System.out.println System.out System System.out pieTaste - absMinTaste pieTaste absMinTaste String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int L = scanner.nextInt();

        int absMinTaste = 1000;
        int pieTaste = 0;
        for (int i = 1 ; i <= N ; i++) {
            int taste = L + i - 1;
            pieTaste += taste;
            if (Math.abs(absMinTaste) > Math.abs(taste)) {
                absMinTaste = taste;
            }
        }

        System.out.println(pieTaste - absMinTaste);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int L = scanner.nextInt();

        int absMinTaste = 1000;
        int pieTaste = 0;
        for (int i = 1 ; i <= N ; i++) {
            int taste = L + i - 1;
            pieTaste += taste;
            if (Math.abs(absMinTaste) > Math.abs(taste)) {
                absMinTaste = taste;
            }
        }

        System.out.println(pieTaste - absMinTaste);
    }
} Main

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int L = scanner.nextInt();

        int absMinTaste = 1000;
        int pieTaste = 0;
        for (int i = 1 ; i <= N ; i++) {
            int taste = L + i - 1;
            pieTaste += taste;
            if (Math.abs(absMinTaste) > Math.abs(taste)) {
                absMinTaste = taste;
            }
        }

        System.out.println(pieTaste - absMinTaste);
    }
}
