Palindromes#873

Palindromes

1 second
128 megabytes
Very easy

A non-empty string is called a palindrome if it reads the same from left to right and from right to left.

You are given a word consisting of uppercase Latin letters. By deleting some set of characters from this word (possibly none), you can obtain another string. Find the number of ways to delete a set of characters so that the resulting string is a palindrome. Ways that differ only by the order of deletion are considered the same.

Input

One string of length (1 \leq n \leq 60).

Output

Print the number of ways to delete characters to obtain a palindrome.

Examples

Example 1

Loading
Loading