1. You are given a string.
2. You have to print the count of distinct and non-empty palindromic subsequences in the given string.
3. Two sequences s1 and s2 are distinct if here is some i, for which ith character in s1 and s2 are different.
Note -> String contains only lowercase letters.
-> The answer will be in the integer range only.Input Format
A String
Output Format
An Integer
Constraints
1 <= length of string <= 10000
Example
Input
bccb
Output
6