Problem9992--ABC320 —— B - Longest Palindrome

9992: ABC320 —— B - Longest Palindrome

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

Description

You are given a string $S$. Find the maximum length of a contiguous substring of $S$ that is a palindrome.  
Note that there is always a contiguous substring of $S$ that is a palindrome.

Input

The input is given from Standard Input in the following format:

```
$S$
```

Output

Print the answer.

Constraints

-   $S$ is a string of length between $2$ and $100$, inclusive, consisting of uppercase English letters.

Sample 1 Input

TOYOTA

Sample 1 Output

5
TOYOT, a contiguous substring of TOYOTA, is a palindrome of length 5.
TOYOTA, the only length-6 contiguous substring of TOYOTA, is not a palindrome, so print 5.

Sample 2 Input

ABCDEFG

Sample 2 Output

1
Every contiguous substring of length 1 is a palindrome.

Sample 3 Input

AAAAAAAAAA

Sample 3 Output

10

Source/Category