#D7864. Palindromic Anagram

    ID: 6539 Type: Default 1000ms 134MiB

Palindromic Anagram

Palindromic Anagram

Problem statement

Given the string S S . Find the number of all anagrams in S S that are palindromic.

An anagram of the string X X is an anagram of Y Y , which means that X X is equal to Y Y , or that the rearranged characters of X X are equal to Y Y . For example, for the string abcd, abcd and cbda are anagrams, but abed, cab and abcdd are not anagrams.

When the string X X is a palindrome, it means that the reverse reading of X X is equal to X X itself. For example, abc and ab are not palindromes, and a and abccba are palindromes.

Constraint

  • 1 leqS leq40 1 \ leq | S | \ leq 40 (S | S | is the length of the string S S )
  • S S contains only lowercase letters.
  • The answer is guaranteed to be less than 263 2 ^ {63} .

input

Input follows the following format.

S S

output

Output the number on one line.

Examples

Input

ab

Output

0

Input

abba

Output

2

inputFormat

input

Input follows the following format.

S S

outputFormat

output

Output the number on one line.

Examples

Input

ab

Output

0

Input

abba

Output

2

样例

ab
0