#include <bits/stdc++.h>
using namespace std;
int recursive(string s) {
  int a[26];
  int ev = 0;
  for (int i = 0; i < 26; i++) a[i] = 0;
  for (int i = 0; i < s.length(); i++) {
    a[s[i] - 0x61]++;
  }
  for (int i = 0; i < 26; i++) {
    ev += a[i] & 1;
  }
  if (ev <= 1) {
    return 1;
  }
  int m = INT_MAX;
  for (int i = s.length() - 1; i > 0; i--) {
    int k = --a[s[i] - 0x61];
    if (k % 2 == 0)
      ev--;
    else
      ev++;
    if (ev <= 1) {
      m = min(m, recursive(s.substr(i)));
    }
  }
  return 1 + m;
}
int main() {
  string s;
  cin >> s;
  cout << recursive(s) << endl;
}
