#atcoderABC057C. 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:
Output
Print the minimum value of as ranges over all pairs of positive integers such that .
Input 1
10000
Output 1
3
has a minimum value of at .
Input 2
1000003
Output 2
7
There are two pairs that satisfy the condition: and . For these pairs, .
Input 3
9876543210
Output 3
6