#include <bits/stdc++.h>
using namespace std;
template <typename T>
void get(T& t) {
  cin >> t;
}
string str;
void proce(int start, vector<int>& distances, int dist) {
  int bb = 0;
  for (int i = start; i < str.size(); i++) {
    bb ^= 1 << (str.at(i) - 'a');
    if ((bb & (bb - 1)) == 0 && distances[i + 1] > dist + 1) {
      distances[i + 1] = dist + 1;
      proce(i + 1, distances, dist + 1);
    }
  }
  return;
}
int main(void) {
  get(str);
  vector<int> distances(str.size() + 1);
  for (int i = 1; i <= str.size(); i++) distances[i] = str.size();
  proce(0, distances, 0);
  cout << distances[str.size()] << endl;
  return 0;
}
