The Riddle of the Ancient Tribe#6364

The Riddle of the Ancient Tribe

1 second
64 megabytes
Medium (≈1350)

As they traveled through Brazil, observing the country's preparations for the 2014 FIFA World Cup, our heroes also delved into its rich history. In one city, they visited a museum dedicated to ancient tribes, where a particular rock inscription caught their attention. According to the guide, these tribes believed: "The more times you write the name of a god consecutively in a row, the longer you will live". Unfortunately, only a fragment of such an inscription has survived to the present day. Mr. Kotsky became intrigued by the question: what is the shortest possible name that was originally written and repeated on this rock inscription?

Your task is to help find the answer to this question.

Input

The input consists of a single line containing a string (a fragment of the inscription that has survived), which includes only Latin letters. The length of the string does not exceed characters.

Output

Output a single number: the minimum possible length of the original name that was repeated on the rock inscription.

Examples

Example 1

Loading
Loading