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
/**
 * <p>
 * Unsolved
 * </p>
 * <p>
 * Created on Aug 27, 2012, 11:42:40 AM
 * </p>
 * @Author Andy Y.F. Huang
 */
public class p219BSpecialOfferSuperPrice999Bourles {
  private long absmod(long num, long mod) {
    return num < 0 ? num + mod : num;
  }

  private void solve(int test_number) {
    long price = in.nextLong();
    long limit = in.nextLong();
    long ans = price;
    long ten = 10;
    long nine = 9;
    while (price >= ten) {
      long temp = price - absmod(price % ten - nine, ten);
      if (temp >= price - limit && temp <= price) {
        ans = temp;
        ten *= 10;
        nine = nine * 10 + 9;
      }
      else
        break;
    }
    out.appendln(ans);
  }

  private Input in;
  private Output out;

  void solve() {
    in = new Input("");
    out = new Output("");
    solve(1);
    out.close();
  }

  public static void main(String[] args) {
    p219BSpecialOfferSuperPrice999Bourles solver = new p219BSpecialOfferSuperPrice999Bourles();
    solver.solve();
  }

  static void pln(Object... obj) {
    pf(obj);
    System.out.println();
  }

  static void pf(Object... obj) {
    for (int i = 0; i < obj.length; i++) {
      if (i != 0)
        System.out.print(' ');
      System.out.print(obj[i]);
    }
  }
}

class Input {
  private java.io.BufferedReader reader;
  private java.util.StringTokenizer tokenizer;

  Input(String filename) {
    if (!filename.isEmpty()) {
      try {
        reader = new java.io.BufferedReader(new java.io.FileReader(filename));
      }
      catch (java.io.FileNotFoundException e) {
        throw new RuntimeException(e);
      }
    }
    else
      reader = new java.io.BufferedReader(new java.io.InputStreamReader(
          System.in));
    tokenizer = new java.util.StringTokenizer("");
  }

  String next() {
    while (!tokenizer.hasMoreTokens()) {
      try {
        tokenizer = new java.util.StringTokenizer(reader.readLine());
      }
      catch (java.io.IOException e) {
        throw new RuntimeException(e);
      }
    }
    return tokenizer.nextToken();
  }

  String nextLine() {
    try {
      return reader.readLine();
    }
    catch (java.io.IOException e) {
      throw new RuntimeException(e);
    }
  }

  long nextLong() {
    return Long.parseLong(next());
  }

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

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

}

class Output {
  private java.io.PrintWriter buffer;

  Output(String filename) {
    if (!filename.isEmpty())
      try {
        buffer = new java.io.PrintWriter(filename);
      }
      catch (java.io.FileNotFoundException e) {
        throw new RuntimeException();
      }
    else
      buffer = new java.io.PrintWriter(System.out);
  }

  void flush() {
    buffer.flush();
  }

  void close() {
    buffer.close();
  }

  void append(Object... obj) {
    for (int i = 0; i < obj.length; i++) {
      if (i != 0)
        buffer.write(' ');
      buffer.print(obj[i]);
    }
  }

  void appendln(Object... obj) {
    append(obj);
    buffer.write('\n');
  }
}
