Polycarpus is an amateur businessman. Recently he was surprised to find out that the market for paper scissors is completely free! Without further ado, Polycarpus decided to start producing and selling such scissors.

Polycaprus calculated that the optimal celling price for such scissors would be p bourles. However, he read somewhere that customers are attracted by prices that say something like "Special Offer! Super price 999 bourles!". So Polycarpus decided to lower the price a little if it leads to the desired effect.

Polycarpus agrees to lower the price by no more than d bourles so that the number of nines at the end of the resulting price is maximum. If there are several ways to do it, he chooses the maximum possible price.

Note, Polycarpus counts only the trailing nines in a price.

Input

The first line contains two integers p and d (1 ≤ p ≤ 1018; 0 ≤ d < p) — the initial price of scissors and the maximum possible price reduction.

Please, do not use the %lld specifier to read or write 64-bit integers in С++. It is preferred to use cin, cout streams or the %I64d specifier.

Output

Print the required price — the maximum price that ends with the largest number of nines and that is less than p by no more than d.

The required number shouldn't have leading zeroes.

Examples

Input

1029 102


Output

999


Input

27191 17


Output

27189
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;


public class B {
	static final boolean DEBUG = false;
	
	public static void main(String[] args) throws IOException {
		long a = l(), b = l();

		solve(a, b);

	}
	
	static void solve(long a, long b){
		if (a == 1 || b == 0){
			System.out.println(a);
			return;
		}
		long ans = ++a, minus = -1;
		for (long t = 10;; t*=10){
			if (a%t >b)
				break;
			minus = a%t;
			dbgln("%d %d", t, minus);
		}
		dbgln("%d %d %d", a, ans, minus);
		if (minus != -1)
			ans = a - minus;
		System.out.println(ans-1);
	}
	
	
	static int len(double x){
		if (x == 0)
			return 1;
		int len = 0;
		while (x > 0){
			x = x / 10;
			len++;
			if (x < 1)
				break;
		}
		return len;
	}
	
	
	
	//=================
	
	
	static int[][] dir = {{0, -1}, {1, 0}, {0, 1}, {-1, 0}};
	
	static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	static StringTokenizer st = null;
	
	static void readIntArrays(int n, int[] a) throws IOException {
		for (int i=0; i<n; i++){
			a[i] = i();
		}
	}
	
	static void prt(int[] a){
		if (DEBUG) {
			System.out.println();
			for (int i=0; i<a.length; i++)
				System.out.print(a[i] + " ");
			System.out.println();
		}
	}
	
	static void readIntArrays(int n, int m, int[][] a) throws IOException {
		for (int i=0; i<n; i++){
			for (int j=0; j<n; j++)
				a[i][j] = i();
		}
	}
	static void prt(int[][] a){
		if (DEBUG) {
			System.out.println();
			for (int i=0; i<a.length; i++){
				for (int j=0; j<a[0].length; j++)
					System.out.print(a[i][j] + " ");
				System.out.println();
			}
			System.out.println();
		}
	}	
	static String s() throws IOException {
		if (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}
	
	static int i() throws IOException {
		return Integer.parseInt(s());
	}
	
	static int i(String s) {
		return Integer.parseInt(s);
	}
	
	static long l() throws IOException {
		return Long.parseLong(s());
	}
	
	static long l(String s){
		return Long.parseLong(s);
	}
	
	static double d() throws IOException {
		return Double.parseDouble(s());
	}
	static double d(String s)  {
		return Double.parseDouble(s);
	}	
	
	static void p(String args){
		System.out.print(args);
	}
	
	static void p(String format, Object... args) {
		System.out.print(String.format(format, args));
	}
	
	static void dbg(String format, Object... args){
		if (DEBUG)
			System.out.print(String.format(format, args));
	}
	
	static void dbg(String args){
		if (DEBUG)
			System.out.print(args);
	}
	
	static void dbgln(String format, Object... args){
		if (DEBUG)
			System.out.println(String.format(format, args));
	}
	
	static void dbgln(String args){
		if (DEBUG)
			System.out.println(args);
	}
	
}

//class DJS {
//	int[] p;
//	
//	DJS(int n){
//		p = new int[n];
//		for (int i=0; i<n; i++)
//			p[i] = i;
//	}
//	public int find(int x){
//		if(x != p[x])
//			return p[x] = find(p[x]);
//		return p[x];
//	}
//	public void union(int x, int y){
//		int px = find(x), py = find(y);
//		if (px != py)
//			p[px] = py;
//	}
//	
//}

//class IntegerUtils {
//	public static int gcd(int a, int b) {
//		a = Math.abs(a); b = Math.abs(b);
//		while (b != 0){
//			int tmp = a % b;
//			a=b;
//			b = tmp;
//		}
//		return a;
//	}
//}

