#include <bits/stdc++.h>
using namespace std;
int rcnt[200006];
int dp[200006];
multimap<int, int> M;
bool isp(int n) { return !(n & (n - 1)); }
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; i++) M.emplace(rcnt[i + 1], i + 1);
  queue<pair<int, int> > Q;
  fill(dp, dp + n + 1, 1e9);
  dp[0] = 0;
  Q.push(pair<int, int>(0, 0));
  while (Q.size()) {
    pair<int, int> np = Q.front();
    Q.pop();
    int i = np.second;
    if (dp[i] < np.first) continue;
    int now = rcnt[i];
    vector<int> V;
    auto p = M.equal_range(now);
    for (auto it = p.first; it != p.second; it++) {
      V.push_back(it->second);
    }
    for (int j = 0; j < 26; j++) {
      int now2 = now ^ (1 << j);
      p = M.equal_range(now2);
      for (auto it = p.first; it != p.second; it++) {
        if (it->second > i) V.push_back(it->second);
      }
    }
    for (int j = 0; j < V.size(); j++) {
      if (dp[V[j]] > dp[i] + 1) {
        dp[V[j]] = min(dp[V[j]], dp[i] + 1);
        Q.push(pair<int, int>(dp[V[j]], V[j]));
      }
    }
    M.erase(M.lower_bound(now));
  }
  cout << dp[n] << endl;
}
