Problem:
Score : 700 points

Problem Statement

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

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

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

Constraints

1 \leq |s| \leq 2 \times 10^5

s consists of lowercase English letters.

Input

Input is given from Standard Input in the following format:

s

Output

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

Sample Input 1

aabxyyzz

Sample Output 1

2

The solution is to partition s 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 s as abcabcxabcx = a + b + cabcxabcx.

Solution in Ruby (2.3.3) (judge verdict: Wrong Answer)

s = gets.chomp
sum = 0
cusum = [sum]
s.chars{|c|
  cusum << (sum ^= (1 << c.ord - 0x61))
}

f = ->l,r{
  n = cusum[r] ^ cusum[l]
  n.to_s(2).count(?1) < 2
}

g = ->l,r{
  while !f[l,r]
    r -= 1
  end
  r
}

l = 0
ans1 = 0
loop {
  l = g[l, s.size]
  ans1 += 1
  break if l == s.size
}

h = ->l,r{
  while !f[l,r]
    l += 1
  end
  l
}

r = s.size
ans2 = 0
loop {
  r = h[0, r]
  ans2 += 1
  break if r == 0
}

p [ans1, ans2].min