639. The Number K

0

Medium

Rohan possesses a magical stick of power, denoted as K. He wants to minimize a given number, denoted as N, using this magical stick. The magical stick can delete exactly K digits from the number. Rohan seeks your assistance in solving this problem. Given a non-negative integer num and an integer k, your task is to print the smallest possible integer after removing k digits from num.

Input Format

The first line contains a string num representing a non-negative integer. The second line contains an integer K.

Output Format

Print the smallest possible integer.

Example

Input

1432219 3

Output

1219

Constraints

1 <= num.length <= 10^5 num consists of only digits. num does not have any leading zeros except for the zero itself.
Loading...

View Submissions

Console