You are given a single string s. A "mirrored" selection is formed by choosing some of the characters of s, keeping their original left-to-right order, such that the resulting string reads identically forwards and backwards (a palindrome). Find the length of the longest mirrored selection obtainable from s.
Input format
Line 1: the string s (may be empty, producing a blank line).
s contains only lowercase English letters.
Output format
A single integer: the length of the longest palindromic subsequence of s.
Constraints
- 0 <= |s| <= 40