Palindrome#7445

Palindrome

1 second
128 megabytes
Very hard

Given a string. In one operation you can swap any two letters. Find minimum number of operations needed in order to receive palindrome or if it is impossible.

Input

First line contains one string (1 \leq |s| \leq 1000). Given string is not empty and only contains small latin letters.

Output

Print the minimum number of operations needed in order to receive palindrome or if it is impossible.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading