#include <bits/stdc++.h>
using namespace std;
int spli(string s) {
  if (s.size() == 1) return 1;
  if (s.size() == 0) return 0;
  int sum[26] = {0};
  int cut = 0;
  for (int i = 0; i < s.size(); i++) {
    sum[s[i] - 'a']++;
    int b = 0;
    for (int j = 0; j < 26; j++)
      if (sum[j] % 2 == 1) b++;
    if (b <= 1) cut = i;
  }
  return cut;
}
int spli2(string s) {
  if (s.size() == 1) return 1;
  if (s.size() == 0) return 0;
  int sum[26] = {0};
  int cut = s.size() - 1;
  for (int i = s.size() - 1; i >= 0; i--) {
    sum[s[i] - 'a']++;
    int b = 0;
    for (int j = 0; j < 26; j++)
      if (sum[j] % 2 == 1) b++;
    if (b <= 1) cut = i;
  }
  return cut;
}
int main() {
  string s;
  cin >> s;
  int ans = 0;
  while (s.size() > 0) {
    ans++;
    if (s.size() == 1) break;
    int c = spli(s);
    int d = spli2(s);
    if (c + 1 == s.size()) break;
    if (d == 0) break;
    if (c + 1 > s.size() - d)
      s = s.substr(c + 1, s.size());
    else
      s = s.substr(0, d);
  }
  cout << ans << endl;
  return 0;
}
