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.*;
import java.util.*;

public class B implements Runnable {
    private MyScanner in;
    private PrintWriter out;

    private void solve() {
        long p = in.nextLong(), d = in.nextLong();
        long p10 = 1;
        long ans = p;
        for (int ns = 0; ns <= 18; ++ns) {
            long mod = p % p10;
            if (mod == p10 - 1) {
                ans = p;
            } else if (mod + 1<= d) {
                ans = p - mod - 1;
            }
            p10 *= 10;
        }
        out.println(ans);
    }

    @Override
    public void run() {
        in = new MyScanner();
        out = new PrintWriter(System.out);
        solve();
        in.close();
        out.close();
    }

    public static void main(String[] args) {
        new B().run();
    }

    /*
    END OF SOLUTION
     */

    public class MyScanner {
        private BufferedReader br;
        private StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public MyScanner(String fileName) {
            try {
                br = new BufferedReader(new FileReader(fileName));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        public void close() {
            try {
                br.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        public boolean hasNext() {
            while (st == null || !st.hasMoreTokens()) {
                String s;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                    return false;
                }
                if (s == null) {
                    return false;
                }
                st = new StringTokenizer(s);
            }
            return true;
        }

        public String next() {
            try {
                while (st == null || !st.hasMoreTokens()) {
                    st = new StringTokenizer(br.readLine());
                }
            } catch (IOException e) {
                e.printStackTrace();
                return null;
            }
            return st.nextToken();
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
                return null;
            }
        }

        public int nextInt(int radix) {
            return Integer.parseInt(next(), radix);
        }

        public int nextInt() {
            return nextInt(10);
        }


        public long nextLong(int radix) {
            return Long.parseLong(next(), radix);
        }

        public long nextLong() {
            return nextLong(10);
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public int[] nextIntArray(int size, int radix) {
            int[] a = new int[size];
            for (int i = 0; i < size; ++i) {
                a[i] = nextInt(radix);
            }
            return a;
        }

        public int[] nextIntArray(int size) {
            return nextIntArray(size, 10);
        }

        public long[] nextLongArray(int size, int radix) {
            long[] a = new long[size];
            for (int i = 0; i < size; ++i) {
                a[i] = nextLong(radix);
            }
            return a;
        }

        public long[] nextLongArray(int size) {
            return nextLongArray(size, 10);
        }

        public double[] nextDoubleArray(int size) {
            double[] a = new double[size];
            for (int i = 0; i < size; ++i) {
                a[i] = nextDouble();
            }
            return a;
        }

        public char[][] nextWords(int lines) {
            char[][] a = new char[lines][];
            for (int i = 0; i < lines; ++i) {
                a[i] = next().toCharArray();
            }
            return a;
        }

        public int[][] nextIntArray2D(int n, int m, int radix) {
            int[][] a = new int[n][m];
            for (int i = 0; i < n; ++i) {
                for (int j = 0; j < m; ++j) {
                    a[i][j] = nextInt(radix);
                }
            }
            return a;
        }

        public int[][] nextIntArray2D(int n, int m) {
            return nextIntArray2D(n, m, 10);
        }

        public long[][] nextLongArray2D(int n, int m, int radix) {
            long[][] a = new long[n][m];
            for (int i = 0; i < n; ++i) {
                for (int j = 0; j < m; ++j) {
                    a[i][j] = nextLong(radix);
                }
            }
            return a;
        }

        public long[][] nextLongArray2D(int n, int m) {
            return nextLongArray2D(n, m, 10);
        }

        public double[][] nextDoubleArray2D(int n, int m) {
            double[][] a = new double[n][m];
            for (int i = 0; i < n; ++i) {
                for (int j = 0; j < m; ++j) {
                    a[i][j] = nextDouble();
                }
            }
            return a;
        }
    }
}