#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
int in() {
  int a;
  scanf("%d ", &a);
  return a;
}
string s;
vector<int> occ(1 << 26);
vector<int> cumsum;
vector<int> dp;
int solve(int pos) {
  if (pos >= s.size()) {
    return 0;
  }
  if (dp[pos] != 0) {
    return dp[pos];
  }
  int ret = s.size() - pos;
  int hoge = cumsum[pos];
  for (int c = 0; c < (27); c++) {
    hoge ^= c == 26 ? 0 : (1 << c);
    if (occ[hoge] > 0) {
      int nxt = occ[hoge];
      if (nxt > pos) {
        ret = min(ret, 1 + solve(nxt));
      }
    }
    hoge ^= c == 26 ? 0 : (1 << c);
  }
  return dp[pos] = ret;
}
int main() {
  cin >> s;
  cumsum.resize(s.size() + 1);
  cumsum[0] = 0;
  for (int i = (1); i <= (s.size()); i++)
    cumsum[i] = cumsum[i - 1] ^ (1 << s[i - 1] - 'a');
  int hoge = 0;
  for (int i = 0; i < (s.size() + 1); i++) {
    occ[hoge] = i;
    hoge ^= 1 << s[i] - 'a';
  }
  dp.resize(s.size());
  cout << solve(0) << endl;
  return 0;
}
