5656 - 提高:Manacher 算法:模版题

输入一个只包含小写字母的字符串,长度最大为10^7,求其最大回文子串的长度

Input

1个只包含小写字母的字符串

Output

一个整数

Examples

Input

aaa

Output

3
Time Limit 1 second
Memory Limit 512 MB
Discuss Stats
上一题 下一题