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.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.math.BigInteger;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;

/**
 * Works good for CF
 * @author cykeltillsalu
 */
public class B135 {

    //some local config
    static boolean test = false;
    static String testDataFile = "testdata.txt";
    static String feedFile = "feed.txt";
    CompetitionType type = CompetitionType.CF;
    private static String ENDL = "\n";

    // solution
    private void solve() throws Throwable {
        Long p = lread()+1, d = lread();

        long ans = p;
        for (long ten = 1; p % ten <= d; ten = ten<1e18 ? ten*10 : Long.MAX_VALUE){
            ans = p - p % ten;
        }

        System.out.println(ans - 1);
    }

    public int iread() throws Exception {
        return Integer.parseInt(wread());
    }

    public double dread() throws Exception {
        return Double.parseDouble(wread());
    }

    public long lread() throws Exception {
        return Long.parseLong(wread());
    }

    public String wread() throws IOException {
        StringBuilder b = new StringBuilder();
        int c;
        c = in.read();
        while (c >= 0 && c <= ' ')
            c = in.read();
        if (c < 0)
            return "";
        while (c > ' ') {
            b.append((char) c);
            c = in.read();
        }
        return b.toString();
    }

    public static void main(String[] args) throws Throwable {

        if(test){ //run all cases from testfile:
            BufferedReader testdataReader = new BufferedReader(new FileReader(testDataFile));
            String readLine = testdataReader.readLine();
            int casenr = 0;
            out: while (true) {
                BufferedWriter w = new BufferedWriter(new FileWriter(feedFile));
                if(!readLine.equals("input")){
                    break;
                }
                while (true) {
                    readLine = testdataReader.readLine();
                    if(readLine.equals("output")){
                        break;
                    }
                    w.write(readLine + "\n");
                }
                w.close();
                System.out.println("Answer on case "+(++casenr)+": ");

                new B135().solve();
                System.out.println("Expected answer: ");


                while (true) {
                    readLine = testdataReader.readLine();

                    if(readLine == null){
                        break out;
                    }
                    if(readLine.equals("input")){
                        break;
                    }
                    System.out.println(readLine);
                }
                System.out.println("----------------");
            }
            testdataReader.close();
        } else { // run on server
            new B135().solve();
        }
        out.close();
    }

    public B135() throws Throwable {
        if (test) {
            in = new BufferedReader(new FileReader(new File(feedFile)));
        }
    }

    InputStreamReader inp = new InputStreamReader(System.in);
    BufferedReader in = new BufferedReader(inp);
    static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));

    enum CompetitionType {CF, OTHER};
}