Sasha is a very happy guy, that's why he is always on the move. There are n cities in the country where Sasha lives. They are all located on one straight line, and for convenience, they are numbered from 1 to n in increasing order. The distance between any two adjacent cities is equal to 1 kilometer. Since all roads in the country are directed, it's possible to reach the city y from the city x only if x < y. 

Once Sasha decided to go on a trip around the country and to visit all n cities. He will move with the help of his car, Cheetah-2677. The tank capacity of this model is v liters, and it spends exactly 1 liter of fuel for 1 kilometer of the way. At the beginning of the journey, the tank is empty. Sasha is located in the city with the number 1 and wants to get to the city with the number n. There is a gas station in each city. In the i-th city, the price of 1 liter of fuel is i dollars. It is obvious that at any moment of time, the tank can contain at most v liters of fuel.

Sasha doesn't like to waste money, that's why he wants to know what is the minimum amount of money is needed to finish the trip if he can buy fuel in any city he wants. Help him to figure it out!

Input

The first line contains two integers n and v (2 ≤ n ≤ 100, 1 ≤ v ≤ 100) — the number of cities in the country and the capacity of the tank.

Output

Print one integer — the minimum amount of money that is needed to finish the trip.

Examples

Input


4 2


Output


4


Input


7 6


Output


6

Note

In the first example, Sasha can buy 2 liters for 2 dollars (1 dollar per liter) in the first city, drive to the second city, spend 1 liter of fuel on it, then buy 1 liter for 2 dollars in the second city and then drive to the 4-th city. Therefore, the answer is 1+1+2=4.

In the second example, the capacity of the tank allows to fill the tank completely in the first city, and drive to the last city without stops in other cities.
import java.io.*;
import java.math.BigInteger;
import java.util.*;


public class Main {

    private static List<List<Integer>> subsets;
    private static int count = 0;
    private static BigInteger thirteen = new BigInteger("13");
    private static BigInteger five = new BigInteger("5");
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);
        Scanner scanner = new Scanner(System.in);

        int n = in.nextInt();
        int m = in.nextInt();
        
        if(n - 1 <= m) {
            out.println(n-1);
        }
        else {
            int current = 1;
            int last = n - m;
            int sum = 0;
            while (current <= last) {
                if (current == 1) sum += m;
                else {
                    sum += current;
                }
                current++;
            }
            out.println(sum);
        }

        out.flush();
    }
    static List<Integer> del (int n) {
        List<Integer> list = new ArrayList<>();
        for (int i=1;i*i<=n;i++) {
            if(n%i==0) {
                list.add(i);
                if(i*i!=n) {
                    list.add(n/i);
                }
            }
        }
        return list;
    }
    static int sumOfNumbers(int n) {
        int sum = 0;
        while (n>0) {
            sum+=n%10;
            n/=10;
        }
        return sum;
    }
    static long binPow(long a, long b, long m) {
        //a %= m;
        long res = 1;
        while (b > 0) {
            if (b%2!=0) {
               res = res * a % m;
            }
            a = a * a % m;
            b >>= 1;
        }
        return res;
    }

    static boolean isPrime(long n) {
        if(n < 2) return false;
        for(long i = 2;i*i<=n;i++) {
            if(n%i==0) return false;
        }
        return true;
    }
    static long gcd(long a, long b) {
        return b == 0 ? a : gcd(b,a%b);
    }
    public boolean isPowerOfFour(int num) {
        int n = Integer.bitCount(num);
        String s = Integer.toBinaryString(num);
        if(n == 1 && s.length()%2!=0) return true;
        return false;
    }
    static boolean isAscending(int [] a) {
        for (int i = 0; i < a.length - 1; i++) {
            if(a[i+1] < a[i]) return false;
        }
        return true;
    }
    static boolean isDescending(int [] a) {
        for (int i = 0; i < a.length - 1; i++) {
            if(a[i+1] > a[i]) return false;
        }
        return true;
    }
    static void reverseArray(int [] a) {
        int i = 0;
        int j = a.length - 1;
        while (i<=j) {
            int temp = a[i];
            a[i] = a[j];
            a[j] = temp;
            i++;
            j--;
        }
    }
    static boolean isPossible(int [] a, int [] b) {
        for (int i = 0; i < 26; i++) {
            if(a[i] == 0  && b[i]!=0) return false;
        }
        return true;
    }
    private static int [] freq(String s) {
        int [] f = new int[26];
        for (char c : s.toCharArray()) {
            f[c-'a']++;
        }
        return f;
    }
    private static void dfs(HashMap<Integer,List<Integer>> map, HashMap<Integer,Long> values, int x, int v,HashSet<Integer> set) {
        if(!set.contains(x)) {
            values.put(x, values.getOrDefault(x, 0L) + v);
            set.add(x);
        }
        if(!map.containsKey(x)) {
            return;
        }
        List<Integer> list = map.get(x);
        for (int i = 0; i < list.size(); i++) {
            int key = list.get(i);
            if(!set.contains(key)) {
                values.put(key,values.get(key) +  v);
                set.add(key);
            }
        }
        for (int i = 0; i < list.size();i++) {
            int key = list.get(i);
            dfs(map,values,key,v,set);
        }
    }

    static double gcd(double a,double b) {
        return b == 0 ? a : gcd(b,a%b);
    }
}
class Point {
    int id;
    int value;

    public Point(int id, int value) {
        this.id = id;
        this.value = value;
    }
}

class InputReader extends BufferedReader {
    StringTokenizer tokenizer;

    public InputReader(InputStream inputStream) {
        super(new InputStreamReader(inputStream), 32768);
    }

    public InputReader(String filename) {
        super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(readLine());
            } catch (IOException e) {
                throw new RuntimeException();
            }
        }
        return tokenizer.nextToken();
    }
    public Integer nextInt() {return Integer.valueOf(next());}
    public Long nextLong() {return  Long.valueOf(next());}
    public Double nextDouble() {return Double.valueOf(next());}

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void close() {
            super.close();
        }
    }
}