#include <bits/stdc++.h>
using namespace std;
int readint() {
  char c;
  while (c = getchar(), (c < '0' || c > '9') && c != '-')
    ;
  bool flag = (c == '-');
  if (flag) c = getchar();
  int x = 0;
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - 48;
    c = getchar();
  }
  return flag ? -x : x;
}
inline string tos(int x) {
  string s;
  while (x) s = (char)(x % 10 + '0') + s, x /= 10;
  return s;
}
inline int pt(int a[], int l, int r) {
  int p, i, j;
  p = a[l];
  i = l;
  j = r + 1;
  for (;;) {
    while (a[++i] < p)
      if (i >= r) break;
    while (a[--j] > p)
      if (j <= l) break;
    if (i >= j)
      break;
    else
      swap(a[i], a[j]);
  }
  if (j == l) return j;
  swap(a[l], a[j]);
  return j;
}
inline void q_sort(int a[], int l, int r) {
  int q;
  if (r > l) {
    q = pt(a, l, r);
    q_sort(a, l, q - 1);
    q_sort(a, q + 1, r);
  }
}
int nums[30], cpy[30];
int main() {
  string s;
  cin >> s;
  int i, j, ans = 0;
  for (int i = 0; i < s.size(); i++) {
    nums[s[i] - 'a']++;
  }
  int sum = 0, tsum;
  for (int i = 0; i < 30; i++)
    if (nums[i] % 2 == 1) sum++;
  for (i = 0;;) {
    tsum = sum;
    if (tsum < 2 && i == s.size() - 1) {
      ans++;
      break;
    }
    if (i >= s.size() - 1) break;
    for (j = 0; j < 26; j++) cpy[j] = nums[j];
    for (j = s.size() - 1; j > i + 1; j--) {
      if (tsum < 2) break;
      cpy[s[j] - 'a']--;
      if (cpy[s[j] - 'a'] % 2 == 0)
        tsum--;
      else
        tsum++;
    }
    ans++;
    i = j;
    nums[s[i] - 'a']--;
    if (nums[s[i] - 'a'] % 2)
      sum++;
    else
      sum--;
  }
  cout << ans << endl;
  return 0;
}
