Length of the Longest Palindromic Substring A palindrome is a string which is the same when read forwards and backwards. For example "racecar" is a palindrome, but "Racecar" is not. A substring is a contiguous set of characters in a larger string. Your task is to write a program or method which takes a string or character array as input and outputs the length of the longest substring of that string which is a palindrome.

Examples

Input

banana


Ouput

5


This is because "anana" is a 5 character substring of "banana"

Input

abracadabra


Output

3


This is because both "aca" and "ada" are 3 characters.

Input

True


Output

1


This string has no palindromes that are more than 1 character.

If the input is the empty string the output must be 0.

This is code-golf so the shortest submission in any language wins.

Note: There have been slight variations of this question in the past, which have all had wording issues or been asking a variation of this question. You can see these:

Find the Longest Palindrome in a String by Removing Characters

Longest reverse palindromic DNA substring

How do I find the longest palindrome in a string?

Finding &quot;sub-palindromes&quot;. - The purpose of this challenge is to print all palindromic substring, rather than the length of the longest. As such many of the answers to this question do not have close analogues.
Brachylog, 9 bytes
{s.↔}ᶠlᵐ⌉

Try it online!
Explanation
{   }ᶠ       Find all…
 s.            …substrings of the input…
  .↔           …which are their own reverse
      lᵐ     Map length
        ⌉    Max