最长回文子串

字符串的子串是指字符串中连续的一段, 如“hello”是“helloworld”的一个子串.给定一个字符串s, 找出s的一个子串, 该子串是回文的.

Input

一个字符串s(1<=|s|<=2000), 仅包含小写字母.

Output

s的最长回文子串的长度.

Examples

Input

acmicpc

Output

3

来源

lema
Time limit 1 second
Memory limit 128 MB
讨论 统计