#include <bits/stdc++.h>
int countSum[26][200000];
int bits[200000];
std::unordered_map<int, std::vector<int>> map;
std::string s;
int memo[200000];
int search(int x) {
  if (x == s.size()) return 0;
  if (memo[x] != 0) return memo[x];
  int currBit = 0;
  if (x > 0) currBit = bits[x - 1];
  int ret = 10000000;
  for (auto&& e : map[currBit])
    if (e >= x) ret = std::min(ret, search(e + 1));
  for (int i = 0; i < 26; ++i)
    if (map.find(currBit ^ (1 << i)) != map.end())
      for (auto&& e : map[currBit ^ (1 << i)])
        if (e >= x) ret = std::min(ret, search(e + 1));
  return memo[x] = ret + 1;
};
int main() {
  std::cin >> s;
  for (int i = 0; i < s.size(); ++i) ++countSum[s[i] - 'a'][i];
  for (int i = 0; i < 26; ++i)
    for (int j = 1; j < s.size(); ++j) countSum[i][j] += countSum[i][j - 1];
  for (int i = 0; i < s.size(); ++i) {
    for (int j = 0; j < 26; ++j)
      if (countSum[j][i] % 2) bits[i] |= 1 << j;
    map[bits[i]].push_back(i);
  }
  std::cout << search(0) << std::endl;
}
