#include <bits/stdc++.h>
using namespace std;
int bitct(long long r) {
  int c = 0;
  for (; r; r &= r - 1) c++;
  return c;
}
long long gcd(long long x, long long y) { return x ? gcd(y % x, x) : y; }
long long choose(long long n, long long q) {
  if (n == 0 || q == 0) return 1;
  if (q == 1)
    return n;
  else
    return (choose(n, q - 1) * (n - q + 1) / q);
}
template <typename T>
ostream& operator<<(ostream& o, vector<T> v) {
  o << "[";
  int i = 0, s = v.size();
  for (; i + 1 < s; i++) o << v[i] << ", ";
  if (s) o << v[i];
  o << "]";
  return o;
}
template <typename K, typename V>
ostream& operator<<(ostream& o, unordered_map<K, V> m) {
  o << "{";
  for (auto i : m) o << i.first << " -> " << i.second << ", ";
  o << "}";
  return o;
}
template <typename K, typename V>
ostream& operator<<(ostream& o, map<K, V> m) {
  o << "{";
  for (auto i : m) o << i.first << " -> " << i.second << ", ";
  o << "}";
  return o;
}
template <typename K>
ostream& operator<<(ostream& o, set<K> m) {
  o << "{";
  for (auto i : m) o << i << ", ";
  o << "}";
  return o;
}
template <typename K>
ostream& operator<<(ostream& o, unordered_set<K> m) {
  o << "{";
  for (auto i : m) o << i << ", ";
  o << "}";
  return o;
}
template <typename T>
ostream& printv(vector<T> v) {
  int i = 0, s = v.size();
  for (; i + 1 < s; i++) cout << v[i] << " ";
  if (s) cout << v[i];
  return cout;
}
int main() {
  ios_base::sync_with_stdio(false);
  string S;
  cin >> S;
  map<long long, long long> maxmask;
  vector<long long> least(S.size() + 1, S.size());
  long long mask = 0;
  maxmask[0] = 0;
  least[0] = 0;
  for (int i = 0; i < S.size(); i++) {
    mask ^= (1 << (S[i] - 'a'));
    maxmask[mask] = i + 1;
  }
  mask = 0;
  for (int i = 0; i < S.size(); i++) {
    least[i + 1] = min(least[i + 1], least[i] + 1);
    for (int k = 0; k < 26; k++) {
      long long newmask = mask ^ (1 << k);
      if (maxmask[newmask] > i + 1)
        least[maxmask[newmask]] = min(least[i] + 1, least[maxmask[newmask]]);
    }
    least[maxmask[mask]] = min(least[i] + 1, least[maxmask[mask]]);
    mask ^= (1 << (S[i] - 'a'));
  }
  cout << least[S.size()] << endl;
}
