Score : 300 points
Given is a string S consisting of lowercase English letters. Find the maximum positive integer K that satisfies the following condition:
Here S_1S_2...S_K represents the concatenation of S_1,S_2,...,S_K in this order.
Input is given from Standard Input in the following format:
S
Print the maximum positive integer K that satisfies the condition.
aabbaa
4
We can, for example, divide S into four strings aa
, b
, ba
, and a
.
aaaccacabaababc
12