#0002A4

Petice

Write a program that, given integers N and K, finds the smallest integer greater than N whose decimal representation contains at least K occurrences of digit 5.


InputThe first and only line of input contains two integers N and K, 1 ≤ N1015, 1 ≤ K ≤ 15.

OutputThe first and only line of output should contain a single integer – the smallest number from the task description.
Note: use the 64-bit signed integer type (int64 in Pascal, long long in C/C++).


Input

99 1

Output

105

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.