#include <bits/stdc++.h>
using namespace std;
string str;
int cnt[27];
int odd, even;
int now[27];
int bit[200005];
int main(void) {
  cin >> str;
  int n = str.size();
  int cs = 0;
  int l = 0;
  while (l != n) {
    memset(cnt, 0, sizeof(cnt));
    cs++;
    int most = 0;
    int no = 0;
    for (int i = l; i < n; i++) {
      int v = str[i] - 'a';
      cnt[v]++;
      if (cnt[v] % 2 == 1)
        no++;
      else
        no--;
      if (no <= 1) most = i;
    }
    l = most + 1;
  }
  int ans = cs;
  int r = n;
  cs = 0;
  while (r > 0) {
    memset(cnt, 0, sizeof(cnt));
    cs++;
    int most = 0;
    int no = 0;
    for (int i = r - 1; i >= 0; i--) {
      int v = str[i] - 'a';
      cnt[v]++;
      if (cnt[v] % 2 == 1)
        no++;
      else
        no--;
      if (no <= 1) most = i;
    }
    r = most;
  }
  ans = min(ans, cs);
  printf("%d\n", ans);
  return 0;
}
