Cyclic string#750

Cyclic string

2 seconds
64 megabytes
Medium (≈1350)

A string S has been recorded many times, and then from the resulting line took a substring, and give to you. Your task is to determine the minimum possible length of a string S.

Input

In the first and only line of the input file contains a string that contains only letters, line length up to 50000 characters.

Output

The output file you want to display a single number - the answer to the problem.

Examples

Example 1

Loading
Loading