#include <bits/stdc++.h>
using namespace std;
map<char, int> state, droped;
bool palindrome() {
  int f = 0;
  for (auto x : state)
    if (x.second % 2 != 0) f += 1;
  return (f == 1 || f == 0);
}
void put() {
  for (auto x : state) cout << x.first << ": " << x.second << endl;
}
int main() {
  string input;
  cin >> input;
  for (char x : input) state[x] += 1;
  int last = input.length() - 1;
  int start = 0;
  int index = 0, cnt = 0;
  while (start <= last) {
    for (index = last; !palindrome() && index >= start; index--) {
      state[input[index]] -= 1;
      droped[input[index]] += 1;
    }
    cnt++;
    start = index + 1;
    state = droped;
    droped.clear();
  }
  cout << cnt << endl;
}
