#include <bits/stdc++.h>
using namespace std;
int ans(int pos, vector<int>& parity) {
  int d = parity[parity.size() - 1] ^ parity[pos];
  if (!(d & (d - 1))) return 1;
  int ret = parity.size();
  for (int i = pos + 1; i < parity.size(); i++) {
    d = parity[i] ^ parity[pos];
    if (!(d & (d - 1))) {
      ret = min(ret, ans(i, parity));
    }
  }
  return ret + 1;
}
int main(void) {
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  vector<int> parity(s.size() + 1, 0);
  for (int i = 0; i < s.size(); i++) {
    for (int j = 0; j < 26; j++) parity[i + 1] = parity[i];
    parity[i + 1] ^= (1 << (s[i] - 'a'));
  }
  cout << ans(0, parity) << endl;
  system("pause");
  return 0;
}
