#include <bits/stdc++.h>
using namespace std;
vector<int> counter[26];
bool palindrome(int from, int to) {
  int count[26];
  for (int i = 0; i < 26; i++) {
    count[i] = counter[i][to];
    if (from > 0) count[i] -= counter[i][from - 1];
  }
  int odd = 0;
  for (int i = 0; i < 26; i++) {
    if (count[i] & 1) odd++;
  }
  return odd <= 1;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  int n = s.size();
  for (int i = 0; i < 26; i++) {
    counter[i].resize(n);
  }
  for (int i = 0; i < n; i++) {
    if (i) {
      for (int j = 0; j < 26; j++) {
        counter[j][i] = counter[j][i - 1];
      }
    }
    counter[s[i] - 'a'][i]++;
  }
  int from = 0, to = n - 1;
  int result = 0;
  while (from <= to) {
    if (from == to) {
      result++;
      break;
    } else if (from > to) {
      break;
    } else {
      int maxi = -1;
      int idx = -1;
      int dir = 0;
      for (int i = from; i <= to; i++) {
        if (palindrome(from, i) && i - from + 1 > maxi) {
          maxi = i - from + 1;
          idx = i;
          dir = -1;
        }
        if (palindrome(i, to) && to - i + 1 > maxi) {
          maxi = to - i + 1;
          idx = i;
          dir = 1;
        }
      }
      if (dir == 1) {
        result++;
        to = idx - 1;
      } else if (dir == -1) {
        result++;
        from = idx + 1;
      } else {
        cout << "Bad" << endl;
      }
    }
  }
  cout << result << endl;
  return 0;
}
