题目描述
Problem Statement
Takahashi is a cashier.
There is a cash register with 11 keys: 00, 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
The cash register initially displays 0.
Whenever he types the key 00, the displayed number is multiplied by 100;
whenever he types one of the others, the displayed number is multiplied by 10, and then added by the number written on the key.
Takahashi wants the cash register to display an integer S.
At least how many keystrokes are required to make it display S?
Input
The input is given from Standard Input in the following format:
S
Output
Print the answer in a line.
Constraints
- $1\leq S\leq 10^{100000}$
- S is an integer.
Sample Input 1
40004
Sample Output 1
4
For example, the following four keystrokes make the cash register display 40004.
Initially, the cash register displays 0.
- Type the key 4. It now displays 4.
- Type the key 00. It now displays 400.
- Type the key 0. It now displays 4000.
- Type the key 4. It now displays 40004.
He cannot make it display 40004 with three or fewer keystrokes, so 4 should be printed.
Sample Input 2
1355506027
Sample Output 2
10
Sample Input 3
10888869450418352160768000001
Sample Output 3
27
Note that S may not fit into $a 64-\operatorname{bit}$ integer type.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分