#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> cnt[26];
int bfs() {
  queue<pair<int, int> > q;
  q.push(make_pair(0, 0));
  int res = 0;
  while (!q.empty()) {
    pair<int, int> p = q.front();
    q.pop();
    int start = p.first;
    int num = p.second;
    for (int i = start; i < n; i++) {
      int odd = 0;
      for (int j = 0; j < 26; j++) {
        if (start == 0) {
          if (cnt[j][i] % 2 == 1) {
            odd++;
            if (odd > 1) goto lbl;
          }
        } else if ((cnt[j][i] - cnt[j][start - 1]) % 2 == 1) {
          odd++;
          if (odd > 1) goto lbl;
        }
      }
      if (i == n - 1) {
        res = num + 1;
        goto lbl2;
      }
      q.push(make_pair(i + 1, num + 1));
    lbl:;
    }
  }
lbl2:
  return res;
}
int main() {
  string s;
  cin >> s;
  n = s.size();
  for (int i = 0; i < 26; i++) {
    cnt[i].resize(s.size(), 0);
  }
  for (int i = 0; i < s.size(); i++) {
    for (int j = 0; j < 26; j++) {
      if (i == 0) {
        if (s[i] - 'a' == j) {
          cnt[j][i] = 1;
        } else {
          cnt[j][i] = 0;
        }
      } else {
        if (s[i] - 'a' == j) {
          cnt[j][i] = cnt[j][i - 1] + 1;
        } else {
          cnt[j][i] = cnt[j][i - 1];
        }
      }
    }
  }
  cout << bfs() << endl;
  return 0;
}
