Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

B. The number on the board

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputSome natural number was written on the board. Its sum of digits was not less than *k*. But you were distracted a bit, and someone changed this number to *n*, replacing some digits with others. It's known that the length of the number didn't change.

You have to find the minimum number of digits in which these two numbers can differ.

Input

The first line contains integer *k* (1 ≤ *k* ≤ 10^{9}).

The second line contains integer *n* (1 ≤ *n* < 10^{100000}).

There are no leading zeros in *n*. It's guaranteed that this situation is possible.

Output

Print the minimum number of digits in which the initial number and *n* can differ.

Examples

Input

3

11

Output

1

Input

3

99

Output

0

Note

In the first example, the initial number could be 12.

In the second example the sum of the digits of *n* is not less than *k*. The initial number could be equal to *n*.

Codeforces (c) Copyright 2010-2018 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Oct/18/2018 02:43:12 (f1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|