#include <bits/stdc++.h>
using namespace std;
template <typename T>
void get(T& t) {
  cin >> t;
}
int counting(string& s, int start) {
  int bb = 0;
  int ret = start;
  for (int i = start; i < s.size(); i++) {
    bb ^= 1 << (s.at(i) - 'a');
    if ((bb & (bb - 1)) == 0) ret = i + 1;
  }
  return ret;
}
int counting2(string& s, int start) {
  int bb = 0;
  int ret = start;
  for (int i = start; i >= 0; i--) {
    bb ^= 1 << (s.at(i) - 'a');
    if ((bb & (bb - 1)) == 0) ret = i - 1;
  }
  return ret;
}
int main(void) {
  string s;
  get(s);
  int ans = 0;
  int idx = 0;
  while (idx < s.size()) {
    ans++;
    idx = counting(s, idx);
  }
  int ans2 = 0;
  idx = s.size() - 1;
  while (idx >= 0) {
    ans2++;
    idx = counting2(s, idx);
  }
  cout << min(ans, ans2) << endl;
  return 0;
}
