LearnPy Hub
← Arena
EasyRating 800

Wrong Subtraction

A child subtracts one from a number like this: if the last digit isn't zero, it decreases by one; if it is zero, the number is divided by 10. Do this k times and print the result (it stays positive).

Input

Two integers n (2 ≤ n ≤ 10⁹) and k (1 ≤ k ≤ 50).

Output

The result.

Sample 1

Input
512 4
Output
50

Sample 2

Input
1000000000 9
Output
1
solution.py
Output appears here
Wrong Subtraction · Python Arena problem · LearnPy Hub