Anton likes to listen to fairy tales, especially when Danik, Anton's best friend, tells them. Right now Danik tells Anton a fairy tale:

"Once upon a time, there lived an emperor. He was very rich and had much grain. One day he ordered to build a huge barn to put there all his grain. Best builders were building that barn for three days and three nights. But they overlooked and there remained a little hole in the barn, from which every day sparrows came through. Here flew a sparrow, took a grain and flew away..."

More formally, the following takes place in the fairy tale. At the beginning of the first day the barn with the capacity of n grains was full. Then, every day (starting with the first day) the following happens:

  * m grains are brought to the barn. If m grains doesn't fit to the barn, the barn becomes full and the grains that doesn't fit are brought back (in this problem we can assume that the grains that doesn't fit to the barn are not taken into account). 
  * Sparrows come and eat grain. In the i-th day i sparrows come, that is on the first day one sparrow come, on the second day two sparrows come and so on. Every sparrow eats one grain. If the barn is empty, a sparrow eats nothing. 



Anton is tired of listening how Danik describes every sparrow that eats grain from the barn. Anton doesn't know when the fairy tale ends, so he asked you to determine, by the end of which day the barn will become empty for the first time. Help Anton and write a program that will determine the number of that day!

Input

The only line of the input contains two integers n and m (1 ≤ n, m ≤ 1018) — the capacity of the barn and the number of grains that are brought every day.

Output

Output one integer — the number of the day when the barn will become empty for the first time. Days are numbered starting with one.

Examples

Input

5 2


Output

4


Input

8 1


Output

5

Note

In the first sample the capacity of the barn is five grains and two grains are brought every day. The following happens:

  * At the beginning of the first day grain is brought to the barn. It's full, so nothing happens. 
  * At the end of the first day one sparrow comes and eats one grain, so 5 - 1 = 4 grains remain. 
  * At the beginning of the second day two grains are brought. The barn becomes full and one grain doesn't fit to it. 
  * At the end of the second day two sparrows come. 5 - 2 = 3 grains remain. 
  * At the beginning of the third day two grains are brought. The barn becomes full again. 
  * At the end of the third day three sparrows come and eat grain. 5 - 3 = 2 grains remain. 
  * At the beginning of the fourth day grain is brought again. 2 + 2 = 4 grains remain. 
  * At the end of the fourth day four sparrows come and eat grain. 4 - 4 = 0 grains remain. The barn is empty. 



So the answer is 4, because by the end of the fourth day the barn becomes empty.
import java.util.*;


import static java.lang.Math.*;

import java.io.DataInputStream; 
import java.io.FileInputStream; 
import java.io.IOException; 
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.math.BigInteger; 

public class Main 
{ 

	static int mod = 1000000007;
	static int MOD = 1000000007;
	static final long M = (int)1e9+7;

	
	static class Pair implements Comparable<Pair>
	{
		int a, b;
		public Pair(int aa, int bb)
		{
			a = aa; b = bb;
		}
		public int compareTo(Pair p)
		{
			if(a == p.a) return b - p.b;
			return a - p.a;
		}
	}
	
	/*
	 * IO FOR 2D GRID IN JAVA
	 * char[][] arr = new char[n][m]; //grid in Q.
			
			for(int i = 0;i<n;i++)
			{
				char[] nowLine = sc.next().toCharArray();
				for(int j = 0;j<m;j++)
				{
					arr[i][j] = nowLine[i];
				}
			}
	 * */
	
	
	
	public static void main(String[] args) throws IOException 
	{ 
		Reader sc = new Reader();
		
		PrintWriter out = new PrintWriter(System.out);
		
		
			long n = sc.nextLong(), m = sc.nextLong();
			if(m >= n)
			{
				System.out.println(n);
				return;
			}
			long left = 1, right = (long)(2e9);
			long ans = 0, p = n-m;
			while(left != right)
			{
				long mid = (left+right)>>1;
				long calc = mid*(mid+1)/2;
				if(calc >= p)
				{
					right = mid;
				}
				else {
					left = mid+1;
				}
			}
			
			long res = m + left;
			System.out.println(res);
		
		
		out.close();
	}
	
	static class Reader 
	{ 
		final private int BUFFER_SIZE = 1 << 16; 
		private DataInputStream din; 
		private byte[] buffer; 
		private int bufferPointer, bytesRead; 

		public Reader() 
		{ 
			din = new DataInputStream(System.in); 
			buffer = new byte[BUFFER_SIZE]; 
			bufferPointer = bytesRead = 0; 
		} 

		public Reader(String file_name) throws IOException 
		{ 
			din = new DataInputStream(new FileInputStream(file_name)); 
			buffer = new byte[BUFFER_SIZE]; 
			bufferPointer = bytesRead = 0; 
		} 

		public String next() throws IOException 
		{ 
			byte[] buf = new byte[64]; // line length 
			int cnt = 0, c; 
			while ((c = read()) != -1) 
			{ 
				if (c == '\n') 
					break; 
				buf[cnt++] = (byte) c; 
			} 
			return new String(buf, 0, cnt); 
		} 
		
		public int nextInt() throws IOException 
		{ 
			int ret = 0; 
			byte c = read(); 
			while (c <= ' ') 
				c = read(); 
			boolean neg = (c == '-'); 
			if (neg) 
				c = read(); 
			do
			{ 
				ret = ret * 10 + c - '0'; 
			} while ((c = read()) >= '0' && c <= '9'); 

			if (neg) 
				return -ret; 
			return ret; 
		}
		int[] readArray(int n) throws IOException {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}

		public long nextLong() throws IOException 
		{ 
			long ret = 0; 
			byte c = read(); 
			while (c <= ' ') 
				c = read(); 
			boolean neg = (c == '-'); 
			if (neg) 
				c = read(); 
			do { 
				ret = ret * 10 + c - '0'; 
			} 
			while ((c = read()) >= '0' && c <= '9'); 
			if (neg) 
				return -ret; 
			return ret; 
		} 

		public double nextDouble() throws IOException 
		{ 
			double ret = 0, div = 1; 
			byte c = read(); 
			while (c <= ' ') 
				c = read(); 
			boolean neg = (c == '-'); 
			if (neg) 
				c = read(); 

			do { 
				ret = ret * 10 + c - '0'; 
			} 
			while ((c = read()) >= '0' && c <= '9'); 

			if (c == '.') 
			{ 
				while ((c = read()) >= '0' && c <= '9') 
				{ 
					ret += (c - '0') / (div *= 10); 
				} 
			} 

			if (neg) 
				return -ret; 
			return ret; 
		} 

		private void fillBuffer() throws IOException 
		{ 
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE); 
			if (bytesRead == -1) 
				buffer[0] = -1; 
		} 

		private byte read() throws IOException 
		{ 
			if (bufferPointer == bytesRead) 
				fillBuffer(); 
			return buffer[bufferPointer++]; 
		} 

		public void close() throws IOException 
		{ 
			if (din == null) 
				return; 
			din.close(); 
		}

		public BigInteger nextBigInteger() {
			// TODO Auto-generated method stub
			return null;
		}

	}

	
	public static boolean isPrime(int n) {
		if(n == 1)
		{
			return false;
		}
		for(int i = 2;i*i<=n;i++)
		{
			if(n%i == 0)
			{
				return false;
			}
		}
		return true;
	}
	
	public static ArrayList<Integer> sieveList(int n)
	{
	       
		ArrayList<Integer> list = new ArrayList<>();
	    boolean prime[]=new boolean[n+2];
	    for(int i=0;i<(n+1);i++)
	    {
	        prime[i]=true;
	    }
	    for(int i=2;i*i<=(n+1);i++)
	    {
	        if(prime[i]==true)
	        for(int p=i*2;p<=(n+1);p+=i)
	        prime[p]=false;
	    }
	    for(int i=2;i<=(n+1);i++)
	    {
	        if(prime[i]==true)
	        list.add(i);
	    }
	    return list;
}
	
	public static int gcd(int a, int b)
	{
		if(b == 0)
		 return a;
		
		else
		return gcd(b,a%b);
	}
	
	public static long LongGCD(long a, long b)
	{
		if(b == 0)
			 return a;
			
			else
			return LongGCD(b,a%b);
	}


	public static int lcm(int a, int b)
    {
        return (a / gcd(a, b)) * b;
    }
	
	public static int phi(int n)  //euler totient function
    { 
        int result = 1; 
        for (int i = 2; i < n; i++) 
            if (gcd(i, n) == 1) 
                result++; 
        return result; 
    }
	
	
	public static int[] computePrefix(int arr[], int n)
	{
		int[] prefix = new int[n];
		prefix[0] = arr[0];
		for(int i = 1;i<n;i++)
		{
			prefix[i] = prefix[i-1]+arr[i];
		}
		
		return prefix;
	}
	
	
	public static int fastPow(int x, int n) //include mod at each step if asked and in args of fn too
	{
		if(n == 0)
			return 1;
		else if(n%2 == 0)
			return fastPow(x*x,n/2);
		else
			return x*fastPow(x*x,(n-1)/2);
	}
	
	
	
	static int LowerBound(int a[], int x) {
		  int l=-1,r=a.length;
		  while(l+1<r) {
		    int m=(l+r)>>>1;
		    if(a[m]>=x) r=m;
		    else l=m;
		  }
		  return r;
		}
	
	
	static int UpperBound(int a[], int x) {
	    int l=-1,r=a.length;
	    while(l+1<r) {
	       int m=(l+r)>>>1;
	       if(a[m]<=x) l=m;
	       else r=m;
	    }
	    return l+1;
	 }
	
	
	   static int power(int x, int y, int p)
	    {
	 
	        int res = 1;
	 
	        x = x % p;
	 
	        while (y > 0) {
	            if (y % 2 == 1)
	                res = (res * x) % p;
	 
	            y = y >> 1; 
	            x = (x * x) % p;
	        }
	 
	        return res;
	    }
	 
	    static int modInverse(int n, int p)
	    {
	        return power(n, p - 2, p);
	    }
	    
	    //Fermat's little theorem for nCr % p.
	    static int nCrModPFermat(int n, int r,
	                             int p)
	    {
	 
	          if (n<r) 
	              return 0;
	        if (r == 0)
	            return 1;
	        int[] fac = new int[n + 1];
	        fac[0] = 1;
	 
	        for (int i = 1; i <= n; i++)
	            fac[i] = fac[i - 1] * i % p;
	 
	        return (fac[n] * modInverse(fac[r], p)
	                % p * modInverse(fac[n - r], p)
	                % p)
	            % p;
	    }
	    
	    
		public static void Sort(int[] a) {
			List<Integer> l=new ArrayList<>();
			for (int i:a) l.add(i);
			Collections.sort(l);
			//Collections.reverse(l);  //Use to Sort decreasingly 
			for (int i=0; i<a.length; i++) a[i]=l.get(i);
		}
}


 