#ABC057C. Digits in Multiplication
Digits in Multiplication
Problem Statement
You are given an integer .
For two positive integers and , we will define as the larger of the following: the number of digits in the decimal notation of , and the number of digits in the decimal notation of .
For example, since has one digit and has two digits.
Find the minimum value of as ranges over all pairs of positive integers such that .
Constraints
- is an integer.
Input
The input is given from Standard Input in the following format:
N
Output
Print the minimum value of as ranges over all pairs of positive integers such that .
Samples
10000
3
has a minimum value of at .
1000003
7
There are two pairs that satisfy the condition: and . For these pairs, .
9876543210
6