#include <bits/stdc++.h>
using namespace std;
unordered_map<int, int> m[2];
const int N = 4.2e5;
int dp[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  m[1][0] = 0;
  int v = 0;
  for (int i = 0; i < ((int)(s).size()); ++i) {
    auto& me = m[i & 1];
    auto& mo = m[i & 1 ^ 1];
    v ^= 1 << (s[i] - 'a');
    dp[i] = N;
    for (int j = 0; j < 26; ++j) {
      auto it = mo.find(1 << j ^ v);
      if (it != mo.end()) dp[i] = min(dp[i], it->second);
    }
    auto it = me.find(v);
    if (it != me.end()) {
      dp[i] = min(it->second, dp[i]) + 1;
    } else {
      me[v] = ++dp[i];
    }
  }
  cout << dp[((int)(s).size()) - 1] << '\n';
}
