Book#2399

Book

1 second
122.174 megabytes
Easy

Misha sometimes reads books, but he does so in an unusual way: he always starts from the first page, and each day he reads exactly as many pages as the sum of the digits of the page number from which he starts reading that day. For example, on the first day, he reads one page; on the second day, two pages; on the third day, four pages; and so on. Misha's father wants to know, if Misha is now reading the -th page of the book, on which day he is reading.

Input

An integer (0 < k < 5000) — the page number Misha is currently reading.

Output

Output a single integer — the number of the day on which Misha is reading the book.

Examples

Example 1

Loading
Loading