Period of the string#5443

Period of the string

0,5 secondi
64 megabyte
Media

A string is said to have a period if \textbf{S} = \textbf{T}^n for some integer .

Given a string , your task is to determine the smallest possible length of such that \textbf{S} = \textbf{T}^n for some integer .

Input

The input consists of a single string , with a length ranging from to 10^6 characters.

Output

Output a single integer representing the length of .

Esempi

Esempio 1

Loading
Loading