#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, vector<int>> bit2pos;
int dfs(int pos) {
  int bit = pos2bit[pos];
  int ret = N;
  if (pos == N) return 0;
  {
    const vector<int>& cand = bit2pos[bit];
    auto it = upper_bound(cand.begin(), cand.end(), pos);
    for (; it != cand.end(); it++) {
      ret = min(ret, 1 + dfs(*it));
    }
  }
  for (int i = 0; i < 26; i++) {
    int nbit = bit ^ (1 << i);
    const vector<int>& cand = bit2pos[nbit];
    auto it = upper_bound(cand.begin(), cand.end(), pos);
    for (; it != cand.end(); it++) {
      ret = min(ret, 1 + dfs(*it));
    }
  }
  return ret;
}
int main() {
  cin >> s;
  N = s.size();
  int bit = 0;
  pos2bit[0] = 0;
  for (int i = 0; i < s.size(); i++) {
    int c = int(s[i] - 'a');
    bit ^= (1 << c);
    pos2bit[i + 1] = bit;
    bit2pos[bit].push_back(i + 1);
  }
  cout << dfs(0) << endl;
  return 0;
}
