#include <bits/stdc++.h>
using namespace std;
int ans(string &s) {
  int n = s.size();
  vector<int> lis(26, 0);
  vector<vector<int>> accum(n, vector<int>(26, 0));
  vector<int> before(26, -1);
  reverse(s.begin(), s.end());
  int left = -1;
  vector<int> ac_tmp(26, 0);
  int diff = 0;
  for (int i = 0; i < n; i++) {
    ac_tmp[s[i] - 'a']++;
    if (ac_tmp[s[i] - 'a'] % 2) {
      diff++;
    } else
      diff--;
    if (diff == 0) left = i;
  }
  int cnt = 0;
  for (int i = left + 1; i < n; i++) {
    if (i >= 1) accum[i] = accum[i - 1];
    accum[i][s[i] - 'a']++;
    if (accum[i][s[i] - 'a'] % 2 == 0) {
      int odd = 0;
      for (int j = 0; j < 26; j++) {
        int tmp = accum[i][j] - accum[before[s[i] - 'a']][j];
        if (tmp % 2) odd++;
      }
      if (odd > 1) {
        cnt++;
        accum[i][s[i] - 'a']++;
      }
    }
    before[s[i] - 'a'] = i;
  }
  for (int i = 0; i < 26; i++) {
    if (accum[n - 1][i] % 2) cnt++;
  }
  if (cnt == 0) cnt = 1;
  return cnt;
}
int main() {
  string s;
  cin >> s;
  int ans1 = ans(s);
  reverse(s.begin(), s.end());
  int ans2 = ans(s);
  cout << min(ans1, ans2) << endl;
  return 0;
}
