#C9535. Shortest Palindromic Substring

    ID: 53639 Type: Default 1000ms 256MiB

Shortest Palindromic Substring

Shortest Palindromic Substring

Given a string s, a palindromic substring is defined as any contiguous sequence of characters in s that reads the same backward as forward. In this problem, you are required to find the length of the shortest palindromic substring in s.

Note: Since every non-empty string has at least one single-character substring which is a palindrome, the answer will always be 1 for non-empty strings.

Input is provided via standard input and output must be written to standard output.

inputFormat

The input consists of a single line containing the string s.

outputFormat

Output an integer representing the length of the shortest palindromic substring in s.

## sample
amazon
1