#include <bits/stdc++.h>
const long long inf = 1145141919;
const long long mod = 1000000007;
using namespace std;
template <class T>
void debug(T *a, long long l, long long r, const char *name) {
  for (long long i = l; i < r; i++)
    cout << name << "[" << i << "]=" << a[i] << endl;
}
long long N;
long long p[200001][26];
signed main() {
  long long i, j;
  string s;
  cin >> s;
  for (i = 0; i < s.size(); i++) {
    for (j = 0; j < 26; j++) p[i + 1][j] = p[i][j];
    p[i + 1][s[i] - 'a']++;
  }
  long long u = 0;
  long long ans = 0;
  while (u < s.size()) {
    for (i = s.size(); i > u; i--) {
      bool f = false;
      for (j = 0; j < 26; j++)
        if ((p[i][j] - p[u][j]) % 2) {
          f = true;
          break;
        }
      if (!f) break;
    }
    u = i;
    if (u >= s.size()) break;
    for (i = s.size(); i > u; i--) {
      long long f = 0;
      for (j = 0; j < 26; j++)
        if ((p[i][j] - p[u][j]) % 2) f++;
      if (f < 2) break;
    }
    ans++;
    u = i;
  }
  if (ans == 0) ans = 1;
  u = 0;
  long long ans2 = 0;
  reverse(begin(s), end(s));
  fill(p[0], p[0] + 26, 0);
  for (i = 0; i < s.size(); i++) {
    for (j = 0; j < 26; j++) p[i + 1][j] = p[i][j];
    p[i + 1][s[i] - 'a']++;
  }
  while (u < s.size()) {
    for (i = s.size(); i > u; i--) {
      bool f = false;
      for (j = 0; j < 26; j++)
        if ((p[i][j] - p[u][j]) % 2) {
          f = true;
          break;
        }
      if (!f) break;
    }
    u = i;
    if (u >= s.size()) break;
    for (i = s.size(); i > u; i--) {
      long long f = 0;
      for (j = 0; j < 26; j++)
        if ((p[i][j] - p[u][j]) % 2) f++;
      if (f < 2) break;
    }
    ans2++;
    u = i;
  }
  if (ans2 == 0) ans2 = 1;
  ans = min(ans, ans2);
  cout << ans << endl;
}
