#include <bits/stdc++.h>
using namespace std;
long long atoz[26] = {0};
int kaibun() {
  int cnt = 0;
  for (int i = 0; i < 26; i++) {
    if (atoz[i] % 2 == 1) {
      cnt++;
    }
  }
  if (cnt < 2) {
    return 1;
  } else {
    return 0;
  }
}
int main() {
  char a = 'a';
  long long ans = 0;
  string s;
  cin >> s;
  long left = 0, right = s.length();
  for (long i = left; i < right; i++) {
    atoz[s[i] - 'a']++;
  }
  while (left < s.length()) {
    if (kaibun()) {
      ans++;
      left = right;
      right = s.length();
      for (int i = 0; i < 26; i++) {
        atoz[i] = 0;
      }
      for (long i = left; i < right; i++) {
        atoz[s[i] - 'a']++;
      }
    } else {
      right--;
      atoz[right]--;
    }
  }
  cout << ans << endl;
  return 0;
}
