Least Number

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

You are given a number NN and a digit dd. Consider all numbers which do not contain digit dd in their decimal notation. Find the minimum such number for which the sum of its digits is exactly NN.

입력

The first line contains two integers NN and dd (2N1062 \le N \le 10^{6}, 0d90 \le d \le 9).

출력

Print one integer: the minimum number which does not contain digit dd and has the sum of its digits equal to NN.