#include <bits/stdc++.h>
using namespace std;
string s;
int n;
int f(int l, int r) {
  vector<int> alph(26, 0);
  int i, j;
  for (i = l; i <= r; i++) alph[s[i] - 'a']++;
  int ret = 0;
  i = l;
  for (j = l + 1; j <= r; j++)
    if (alph[s[j - 1] - 'a'] == 1 && alph[s[j] - 'a'] == 1) {
      ret += f(i, j - 1);
      i = j;
    }
  if (i != l) ret += f(i, r);
  if (ret == 0) {
    for (i = 0; i < 26; i++)
      if (alph[i] % 2) ret++;
    if (ret == 0) ret++;
  }
  return ret;
}
int main(void) {
  cin >> s;
  n = s.size();
  cout << f(0, n - 1) << endl;
}
