#include <bits/stdc++.h>
using namespace std;
unordered_map<long long, long long> U;
long long b[26];
signed main() {
  U[0] = 1;
  string a;
  cin >> a;
  for (char c : a) {
    b[c - 'a']++;
    long long k = 0;
    for (long long i = 0; i < 26; i++) {
      k *= 2;
      k += (b[i] & 1);
    }
    for (long long i = 0; i < 26; i++) {
      long long n = 0;
      for (long long j = 0; j < 26; j++) {
        n *= 2;
        if (i != j)
          n += (b[j] & 1);
        else
          n += (b[j] + 1) % 2;
      }
      if (U[n]) {
        if (U[k]) {
          U[k] = min(U[k], U[n] + 1);
        } else {
          U[k] = U[n] + 1;
        }
      }
    }
  }
  long long k = 0;
  for (long long i = 0; i < 26; i++) {
    k *= 2;
    k += (b[i] & 1);
  }
  cout << U[k] - 1 << endl;
}
