#include <bits/stdc++.h>
using ll = long long;
using namespace std;
using bs = bitset<26>;
int main() {
  string s;
  cin >> s;
  int len = s.size();
  bs rui[len + 1];
  for (int i = 0; i < len; i++) {
    rui[i + 1] = rui[i];
    rui[i + 1].flip(s[i] - 'a');
  }
  unordered_map<bs, int> dp;
  dp[0] = 0;
  for (int i = 0; i <= len; i++) {
    for (int i = 0; i <= 26; i++) {
      bs from = rui[i];
      if (i > 0) from.flip(i - 1);
      if (!dp.count(rui[i])) dp[rui[i]] = 200010;
      if (!dp.count(from)) dp[from] = 200010;
      dp[rui[i]] = min(dp[rui[i]], dp[from] + 1);
    }
  }
  cout << max(dp[rui[len]], 1) << '\n';
  return 0;
}
