The number of n-digit numbers#9936

The number of n-digit numbers

1 second
64 megabytes
Medium

Given two natural numbers and , determine how many natural numbers with exactly digits are less than .

Input

Two natural numbers and provided on a single line, separated by a space (1 \leq n \leq 12, 1 \leq m \leq 10^{12}).

Output

Output the number of -digit natural numbers that are less than .

Examples

Example 1

Loading
Loading