#include <bits/stdc++.h>
using namespace std;
using lli = long long int;
string s;
int main() {
  cin >> s;
  int n = s.size();
  int cnt[26] = {};
  int ans = 1;
  string ss = "";
  s += "*";
  for (lli i = 0; i < (n); i++) {
    if (s[i] == '*') continue;
    if (s[i] == s[i + 1]) {
      s[i + 1] = '*';
    } else {
      ss += s[i];
    }
  }
  s = ss;
  n = s.size();
  for (lli i = 0; i < (n); i++) cnt[s[i] - 'a']++;
  for (lli i = 0; i < (26); i++) cnt[i] %= 2;
  for (lli i = 0; i < (n); i++) {
    int x = s[i] - 'a';
    if (cnt[x]) {
      ans++;
      cnt[x] = 0;
    }
  }
  if (ans != 1) ans--;
  cout << ans << endl;
}
