#include <bits/stdc++.h>
using namespace std;
int rcnt[200006];
int dp[200006];
multimap<int, int> M;
set<pair<int, int> > S;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  for (int i = 0; i < n; i++) {
    int l = s[i] - 'a';
    rcnt[i + 1] += 1 << l;
  }
  for (int i = 0; i < n; i++) {
    rcnt[i + 1] ^= rcnt[i];
  }
  for (int i = 0; i < n + 1; i++) {
    M.emplace(rcnt[i], i);
    S.insert(pair<int, int>(rcnt[i], i));
  }
  queue<pair<int, int> > Q;
  fill(dp, dp + n + 1, 1e9);
  dp[0] = 0;
  Q.push(pair<int, int>(0, 0));
  while (!Q.empty()) {
    pair<int, int> np = Q.front();
    Q.pop();
    int i = np.second;
    if (dp[i] < np.first) continue;
    if (i == n) {
      cout << dp[i] << endl;
      return 0;
    }
    int now = rcnt[i];
    vector<pair<int, int> > V;
    auto it = S.lower_bound(pair<int, int>(now, 0));
    for (; it != S.end(); it++) {
      pair<int, int> p1 = *it;
      int e = it->second;
      if (it->first != now) break;
      if (dp[e] > dp[i] + 1) {
        dp[e] = dp[i] + 1;
        Q.push(pair<int, int>(dp[e], e));
        V.push_back(p1);
      }
    }
    for (int j = 0; j < 26; j++) {
      int now2 = now ^ (1 << j);
      it = S.lower_bound(pair<int, int>(now2, 0));
      for (; it != S.end(); it++) {
        pair<int, int> p1 = *it;
        int e = it->second;
        if (it->first != now2) break;
        if (dp[e] > dp[i] + 1) {
          dp[e] = dp[i] + 1;
          Q.push(pair<int, int>(dp[e], e));
          V.push_back(p1);
        }
      }
    }
    for (int j = 0; j < V.size(); j++) {
      S.erase(S.find(V[i]));
    }
  }
  cout << dp[n] << endl;
}
