密码

Background

Very not easy to grind out the old-age room, the two elves were surprised to find a tunnel under the old-age room, but the tunnel door has a password, only unlock the password to enter.

好不容易磨完了养老房,两个小精灵惊奇的发现养老房的下面竟然有一个地道,但是地道的门有密码,只有解开密码才能进去。

Description

Enter a string (string may consist of numbers or letters, length < = 10000) and find the length of the longest palindrome string contained in it. (Note that strings must be continuous)

输入一个字符串(字符串可能是由数字组成,也有可能是由字母组成的,长度<=10000),求出里面所包含的最长回文字符串的长度。(注意字符串必须是连续的)

Input

A line representing the string to be found.

一行,表示需要寻找的字符串。

Output

A number that represents the length of the longest palindrome string.

一个数字,表示最长回文字符串的长度。

Sample 1

Input

1212345676543

Output

9

Sample 2

Input

abcdcbadefghgfed

Output

9

Limitation

对于100%的数据长度>=10。

Source

Amorphophallus Orz Group

信息

ID
1011
难度
2
分类
搜索 点击显示
标签
递交数
3
已通过
2
通过率
67%
上传者

相关

在下列训练计划中:

AOG题库训练计划