#abc174c. [abc174_c]Repsept
[abc174_c]Repsept
Problem Statement
Takahashi loves the number and multiples of .
Where is the first occurrence of a multiple of in the sequence ? (Also see Output and Sample Input/Output below.)
If the sequence contains no multiples of , print -1
instead.
Constraints
- is an integer.
Input
Input is given from Standard Input in the following format:
Output
Print an integer representing the position of the first occurrence of a multiple of . (For example, if the first occurrence is the fourth element of the sequence, print 4
.)
Sample Input 1
101
Sample Output 1
4
None of , , and is a multiple of , but is.
Sample Input 2
2
Sample Output 2
-1
All elements in the sequence are odd numbers; there are no multiples of .
Sample Input 3
999983
Sample Output 3
999982