#include <bits/stdc++.h>
const int INF = 1e8;
using namespace std;
template <typename T, typename U>
ostream& operator<<(ostream& os, const pair<T, U>& p) {
  cout << '(' << p.first << ' ' << p.second << ')';
  return os;
}
template <typename T>
void dpite(T a, T b) {
  return;
}
template <typename T>
void pite(T a, T b) {
  for (T ite = a; ite != b; ite++) cout << (ite == a ? "" : " ") << *ite;
  cout << '\n';
}
template <typename T>
bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
void ios_init() {
  ios::sync_with_stdio(false);
  cin.tie(0);
}
int main() {
  ios_init();
  string s;
  while (cin >> s) {
    int n = s.size();
    map<int, int> dp;
    dp[0] = 0;
    using bs = bitset<26>;
    bs tmp = 0;
    int ans;
    for (int i = (0); i < (n); ++i) {
      int c = s[i] - 'a';
      tmp[c] = !tmp[c];
      int mi = INF;
      for (int i = (0); i < (n); ++i) {
      }
      for (int j = (0); j < (26); ++j) {
        auto t = tmp;
        t[j] = !t[j];
        auto ite = dp.find(t.to_ulong());
        if (ite != dp.end()) {
          chmin(mi, ite->second + 1);
        }
      }
      {
        auto ite = dp.find(tmp.to_ulong());
        if (dp.find(tmp.to_ulong()) != dp.end()) {
          chmin(mi, ite->second + 1);
        }
      }
      ans = mi;
      {
        auto ite = dp.find(tmp.to_ulong());
        if (ite == dp.end()) {
          dp[tmp.to_ulong()] = mi;
        }
      }
    }
    cout << ans << '\n';
  }
  return 0;
}
