#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const ll MOD = 1000000007;
string s;
int N;
int pos2bit[200005];
map<int, set<int>> bit2pos;
int memo[200005];
int main() {
  cin >> s;
  N = s.size();
  int cbit = 0;
  pos2bit[0] = 0;
  for (int i = 0; i < s.size(); i++) {
    int c = int(s[i] - 'a');
    cbit ^= (1 << c);
    pos2bit[i + 1] = cbit;
    bit2pos[cbit].insert(i + 1);
  }
  memset(memo, -1, sizeof(memo));
  priority_queue<P, vector<P>, greater<P>> que;
  que.emplace(0, 0);
  memo[0] = 0;
  for (int pos : bit2pos[0]) {
    memo[pos] = 1;
    que.emplace(1, pos);
  }
  while (que.size()) {
    int pos = que.top().second;
    que.pop();
    int bit = pos2bit[pos];
    for (int i = 0; i < 26; i++) {
      int nbit = bit ^ (1 << i);
      set<int>& ref = bit2pos[nbit];
      set<int> cands = ref;
      ref.clear();
      for (int to : cands) {
        if (to <= pos) {
          ref.insert(to);
          continue;
        }
        if (memo[to] == -1 || memo[to] > memo[pos] + 1) {
          memo[to] = memo[pos] + 1;
          que.emplace(memo[to], to);
        }
      }
    }
  }
  cout << memo[N] << endl;
  return 0;
}
