#include <bits/stdc++.h>
using namespace std;
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  vector<vector<long long>> suml(s.length(), vector<long long>(26, 0));
  vector<vector<long long>> sumr(s.length(), vector<long long>(26, 0));
  for (int i = 0; i < s.length(); i++) {
    if (i != 0) {
      suml[i] = suml[i - 1];
    }
    suml[i][s[i] - 'a']++;
  }
  long long odds = 0;
  bool odds_idx[26] = {false};
  for (int i = 0; i < 26; i++) {
    if (suml[s.length() - 1][i] % 2 == 1) {
      odds++;
      odds_idx[i] = true;
    }
  }
  if (odds <= 1) {
    cout << 1 << endl;
    return 0;
  }
  long long ans = 0;
  long long pre_i = -1;
  for (int i = 0; i < s.length(); i++) {
    long long temp[26] = {0};
    for (int j = 0; j < 26; j++) {
      if (pre_i == -1) {
        temp[j] = suml[i][j];
      } else {
        temp[j] = suml[i][j] - suml[pre_i][j];
      }
    }
    long long todds = 0;
    for (int j = 0; j < 26; j++) {
      if (odds_idx[j] == false) continue;
      if (temp[j] % 2 == 1) {
        todds++;
      }
    }
    if (todds == 1) {
      pre_i = i;
      ans++;
      int next;
      for (int j = i + 1; j < s.length(); j++) {
        if (temp[s[j] - 'a'] % 2 == 0) {
          next = j - 1;
          break;
        } else {
          if (odds_idx[s[j] - 'a'] == true) {
            next = j - 1;
            break;
          }
          temp[s[j] - 'a']++;
        }
      }
      for (int j = 0; j < 26; j++) {
        if (temp[j] % 2 == 1) {
          odds_idx[j] = !odds_idx[j];
        }
      }
      i = next;
    }
  }
  cout << ans << endl;
  return 0;
}
