#codefestival2017qualcd. [code_festival_2017_qualc_d]Yet Another Palindrome Partitioning

[code_festival_2017_qualc_d]Yet Another Palindrome Partitioning

Problem Statement

We have a string ss consisting of lowercase English letters. Snuke is partitioning ss into some number of non-empty substrings. Let the subtrings obtained be s1s_1, s2s_2, ......, sNs_N from left to right. (Here, s=s1+s2+...+sNs = s_1 + s_2 + ... + s_N holds.) Snuke wants to satisfy the following condition:

  • For each ii (1leqileqN1 \\leq i \\leq N), it is possible to permute the characters in sis_i and obtain a palindrome.

Find the minimum possible value of NN when the partition satisfies the condition.

Constraints

  • 1leqsleq2times1051 \\leq |s| \\leq 2 \\times 10^5
  • ss consists of lowercase English letters.

Input

Input is given from Standard Input in the following format:

ss

Output

Print the minimum possible value of NN when the partition satisfies the condition.


Sample Input 1

aabxyyzz

Sample Output 1

2

The solution is to partition ss as aabxyyzz = aab + xyyzz. Here, aab can be permuted to form a palindrome aba, and xyyzz can be permuted to form a palindrome zyxyz.


Sample Input 2

byebye

Sample Output 2

1

byebye can be permuted to form a palindrome byeeyb.


Sample Input 3

abcdefghijklmnopqrstuvwxyz

Sample Output 3

26

Sample Input 4

abcabcxabcx

Sample Output 4

3

The solution is to partition ss as abcabcxabcx = a + b + cabcxabcx.