#include <bits/stdc++.h>
using namespace std;
using VI = vector<int>;
using VVI = vector<VI>;
using BIT = bitset<26>;
bool is_palindrome(BIT b1, BIT b2) {
  auto b = b1 ^ b2;
  cout << "is_palindrome" << endl;
  cout << b1.to_string() << endl;
  cout << b2.to_string() << endl;
  cout << b.to_string() << endl;
  return b.count() < 2;
}
int main() {
  string s;
  cin >> s;
  int n = s.size();
  vector<BIT> cums(n + 1, 0);
  for (int i = 0; i < n; i++) {
    cums[i + 1] = cums[i];
    cums[i + 1][s[i] - 'a'].flip();
  }
  int ans = 0;
  int pos1 = 0;
  int pos2 = cums.size() - 1;
  while (pos2 > pos1) {
    int max1 = pos1;
    for (int i = pos2; i >= pos1; i--) {
      if (is_palindrome(cums[pos1], cums[i])) {
        max1 = i;
        break;
      }
    }
    int min2 = pos2;
    for (int i = pos1; i <= pos2; i++) {
      if (is_palindrome(cums[i], cums[pos2])) {
        min2 = i;
        break;
      }
    }
    if (max1 - pos1 >= pos2 - min2) {
      pos1 = max1;
    } else {
      pos2 = min2;
    }
    ans++;
  }
  cout << ans << endl;
  return 0;
}
