~/algor $ cat problems/string-eng-qisqa-davr
Shortest period of a string
Medium
1000 ms
128 MB
60%
A string $s$ of lowercase Latin letters is given. $s$ is made by writing some string $p$ one or more times in a row (for example, abcabcabc is abc written $3$ times). Find the length of the shortest such $p$; if $s$ is not a repetition of any shorter string, the answer is $|s|$.
Input
One line containing the string $s$.
Output
One integer — the length of $p$.
Note
$1 \le |s| \le 10^{5}$
$s$ consists of lowercase Latin letters (a–z) only
Examples
Input #1
abcabcabc
Output #1
3
Input #2
abcd
Output #2
4