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.util.*;
public class code {
	static printer pw;
	static boolean[] visit;
	static ArrayList<Pair>[] adj;
	static ArrayList<Integer> list;
	static long max=01;
	static void dfs(int i, long c) {
		visit[i]=true;
		max=Math.max(c, max);
		for(Pair p: adj[i]) {
			if(!visit[p.x-1]) {
				dfs(p.x-1, c+1l*p.y);
			}
		}
	}
	public static double dist(Pair a, Pair b) {
		return Math.sqrt((a.x-b.x)*(a.x-b.x)+ (a.y-b.y)*(a.y-b.y));
	}
	public static boolean sign(int x) {
		return x>0;
	}
	static long ceildiv(long x,long y) {
		return x%y==0? x/y: x/y+1;
	}
	static int p,q,r,s,t,u;
	static double test(double x) {
		return p*Math.pow(Math.E, -1*x)+q*Math.sin(x)+r*Math.cos(x)+s*Math.tan(x)+t*x*x+u;
	}
	public static void main(String[] args) throws Exception {
		Scanner sc= new Scanner(System.in);
		pw = new printer();
		int n=sc.nextInt(),m=sc.nextInt();
		if(n-1<=m) {
			pw.println(n-1);
		}else {
			int ans=m;
			ans+=((n-m)*(n-m+1))/2;
			pw.println(ans-1);
		}
		pw.close();
	}
	static class Scanner {
		StringTokenizer st;
		BufferedReader br;
 
		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}
 
		public Scanner(FileReader r) {
			br = new BufferedReader(r);
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
 
		public int[] nextArr(int n) throws IOException {
			int[] arr = new int[n];
			for (int i = 0; i < arr.length; i++)
				arr[i] = nextInt();
			return arr;
		}
		public Integer[] nextsort(int n) throws IOException{
			Integer[] arr=new Integer[n];
			for(int i=0; i<n; i++) 
				arr[i]=nextInt();
			return arr;
		}
		public boolean ready() throws IOException {
			return br.ready();
		}
	}
	static class printer{
		PrintWriter pw;
		public printer() {
			pw=new PrintWriter(System.out);
		}
		public void print(String s) throws IOException{
			pw.print(s);
		}
		public void print(int s) throws IOException{
			pw.print(s);
		}
		public void print(long s) throws IOException{
			pw.print(s);
		}
		public void print(double s) throws IOException{
			pw.print(s);
		}
		public void print(Double s) throws IOException{
			pw.print(s);
		}
		public void print(char s) throws IOException{
			pw.print(s);
		}
		public void print(Integer s) throws IOException{
			pw.print(s);
		}
		public void print(Long s) throws IOException{
			pw.print(s);
		}
		public void print(Character s) throws IOException{
			pw.print(s);
		}
		public void println(String s) throws IOException{
			pw.println(s);
		}
		public void println(int s) throws IOException{
			pw.println(s);
		}
		public void println(long s) throws IOException{
			pw.println(s);
		}
		public void println(char s) throws IOException{
			pw.println(s);
		}
		public void println(double s) throws IOException{
			pw.println(s);
		}
		public void println(Double s) throws IOException{
			pw.println(s);
		}
		public void println(Integer s) throws IOException{
			pw.println(s);
		}
		public void println(Long s) throws IOException{
			pw.println(s);
		}
		public void println(Character s) throws IOException{
			pw.println(s);
		}
		public void println() throws IOException{
			pw.println();
		}
		public void println(int[] arr) throws IOException{
			for(int i=0; i<arr.length-1; i++)
				pw.print(arr[i]+" ");
			pw.println(arr[arr.length-1]);
		}
		public void println(Integer[] arr) throws IOException{
			for(int i=0; i<arr.length-1; i++)
				pw.print(arr[i]+" ");
			pw.println(arr[arr.length-1]);
		}
		public void println(long[] arr) throws IOException{
			for(int i=0; i<arr.length-1; i++)
				pw.print(arr[i]+" ");
			pw.println(arr[arr.length-1]);
		}
		public void println(Long[] arr) throws IOException{
			for(int i=0; i<arr.length-1; i++)
				pw.print(arr[i]+" ");
			pw.println(arr[arr.length-1]);
		}
		public void println(char[] arr) throws IOException{
			for(int i=0; i<arr.length-1; i++)
				pw.print(arr[i]+" ");
			pw.println(arr[arr.length-1]);
		}
		public void println(Character[] arr) throws IOException{
			for(int i=0; i<arr.length-1; i++)
				pw.print(arr[i]+" ");
			pw.println(arr[arr.length-1]);
		}
		public void println(ArrayList<Integer> arr) throws IOException{
			for(int i=0; i<arr.size()-1; i++)
				pw.print(arr.get(i)+" ");
			pw.println(arr.get(arr.size()-1));
		}
		public void println(TreeSet<Integer> arr) throws IOException{
			for(int x: arr) {
				pw.print(x+" ");
			}
		}
		public void close() throws IOException{
			pw.close();
		}
		public void flush() throws IOException{
			pw.flush();
		}
	}
	static class Pair implements Comparable<Pair>{
		int x;
		int y;
		public Pair(int a, int b) {
			this.x=a;
			this.y=b;
		}
		public int compareTo(Pair other) {
			return this.x-other.x;
		}
	}
	static class Tuple implements Comparable<Tuple>{
		int x;
		int y;
		boolean d;
		public Tuple(int a, int b, boolean t) {
			this.x=a;
			this.y=b;
			this.d=t;
		}
		public int compareTo(Tuple other) {
			if(this.d && !other.d) {
				return 1;
			}else if(!this.d && other.d) {
				return -1;
			}else {
				return this.y-other.y;
			}
		}
	}
}