#include <bits/stdc++.h>
using namespace std;
bool is_parindrome(long long tested) {
  int tot = 0;
  for (long long i = 0; i <= 26; i++) {
    if (((tested >> i) & 1) == 1) tot++;
  }
  if (tot > 1)
    return (false);
  else
    return (true);
}
int main() {
  string s;
  long long n, bit[200001] = {};
  long long split[200001];
  cin >> s;
  n = s.length();
  for (long long i = 0; i < n; i++) {
    split[i] = n;
  }
  split[0] = 1;
  bit[0] = 1 << (s[0] - 97);
  for (long long i = 1; i < n; i++) {
    long long ascii = s[i] - 97;
    long long split_tmp = n;
    long long split_idx;
    bit[i] = 1 << ascii;
    bit[i] = bit[i] ^ bit[i - 1];
    if (is_parindrome(bit[i])) {
      split_tmp = 0;
    } else {
      for (long long j = 0; j < i; j++) {
        if (is_parindrome(bit[j] ^ bit[i])) {
          if (split_tmp > split[j]) {
            split_tmp = split[j];
            split_idx = j;
          }
        }
      }
    }
    split[i] = split_tmp + 1;
  }
  cout << split[n - 1] << endl;
}
