Cyclic string#1500

Cyclic string

2 seconds
64 megabytes
Easy

A string was written repeatedly in a row, and then a substring was selected from the resulting string and given to you. Your task is to determine the minimum possible length of the original string .

Input

The first and only line of the input file contains a string consisting only of Latin letters. The length of the string does not exceed characters.

Output

Print a single integer: the answer to the problem.

Examples

Example 1

Loading
Loading