#include <bits/stdc++.h>
using namespace std;
string s;
int mn = 1e9;
bool ok(string p) {
  int cmp[257] = {0};
  for (int i = 0; i < p.size(); i++) {
    cmp[p[i]]++;
  }
  bool one = false;
  for (int i = 'a'; i <= 'z'; i++) {
    if (one && cmp[i] % 2 == 1) {
      return false;
    }
    if (cmp[i] % 2 == 1) {
      one = true;
    }
  }
  return true;
}
bool debug = false;
inline void dfs(int pos, string p, int part) {
  if (debug) cout << "DFS:" << pos << " " << p << " " << part << endl;
  if (part > mn) {
    if (debug) cout << "Stop!" << endl;
    return;
  }
  if (mn == 1) {
    if (debug) cout << "Quick End!" << endl;
    cout << 1;
    exit(0);
  }
  if (pos == s.size() && ok(p)) {
    if (debug) cout << "Found OK:" << p << endl;
    mn = min(mn, part + 1);
    return;
  }
  if (pos == s.size()) return;
  p += s[pos];
  dfs(pos + 1, p, part);
  if (ok(p)) {
    dfs(pos + 1, "", part + 1);
  }
}
int main(int argc, char* argv[]) {
  cin >> s;
  dfs(0, "", 0);
  cout << mn;
  return 0;
}
