#include <bits/stdc++.h>
using namespace std;
string s;
int split(int st, int ed) {
  int cnt[256] = {}, rcnt[256] = {};
  auto check = [](int *cnt) -> bool {
    int eo[2] = {};
    for (int c = 'a'; c <= 'z'; ++c) {
      ++eo[cnt[c] % 2];
    }
    return eo[1] <= 1;
  };
  int m = 0, p, q;
  for (int i = st; i < ed; ++i) {
    cnt[s[i]]++;
    if (check(cnt)) {
      m = i - st + 1, p = i + 1, q = ed;
    }
  }
  if (m == ed - st) {
    return 1;
  }
  for (int i = st; i < ed; ++i) {
    cnt[s[i]]--;
    if (check(cnt)) {
      int r = ed - i;
      if (r > m) {
        m = r, p = st, q = i + 1;
      }
    }
  }
  return 1 + split(p, q);
}
int main(int argc, char *argv[]) {
  cin >> s;
  int ans = split(0, (int)s.length());
  cout << ans << endl;
  return 0;
}
