Decomposition of a Number#1441

Decomposition of a Number

1 second
64 megabytes
Easy

Decompose the given natural number into a sum of natural numbers a_1, a_2, \ldots, a_k such that the sum of the digits of all these numbers, s(a_1) + s(a_2) + \ldots + s(a_k), equals the given natural number . Additionally, the number of addends should be minimized. Here, denotes the sum of the decimal digits of the natural number .

Input

The first line contains an integer (1 \leq N \leq 10^{12}). The second line contains an integer (1 \leq S \leq 10^{12}).

Output

Output the minimal number of addends. If there is no decomposition such that the sum of the digits of the addends equals , output -1.

Examples

Example 1

Loading
Loading