Period of a string#753

Period of a string

1 second
64 megabytes
Medium (≈1350)

The string s is given. Find the string t of minimum length such that s can be represented as a concatenation of one or some copies of t.

Input

One string s (1 ≤ |s| ≤ 5·10^6) that contains the latin letters only.

Output

The length of a string t.

Examples

Example 1

Loading
Loading