AdvancedRating 1700
Longest Palindromic Subsequence
Print the length of the longest subsequence of the string that is a palindrome (length ≤ 1000).
Input
One string.
Output
A length.
Sample 1
Input
bbbab
Output
4
Sample 2
Input
cbbd
Output
2
Output appears here