#include <bits/stdc++.h>
using namespace std;
string s;
unordered_map<int, vector<int> > poses;
int keys[200001];
void setPoses() {
  int cnt[26] = {0};
  int i, j;
  for (i = 0; i <= s.length(); i++) {
    int key = 0;
    for (j = 0; j < 26; j++) {
      if (cnt[j]) {
        key += (1 << j);
      }
    }
    if (poses.find(key) == poses.end()) {
      poses[key] = vector<int>();
    }
    poses[key].push_back(i);
    keys[i] = key;
    cnt[s[i] - 'a']++;
    cnt[s[i] - 'a'] %= 2;
  }
}
int hantenBit(int a, int pos) {
  if ((a >> pos) & 1) {
    return a - (1 << pos);
  }
  return a + (1 << pos);
}
int dp[200001];
int main() {
  cin >> s;
  setPoses();
  int i, j, k;
  for (i = 0; i <= s.length(); i++) dp[i] = 11451419;
  dp[0] = 0;
  for (i = 0; i < s.length(); i++) {
    if (poses.find(keys[i]) != poses.end()) {
      vector<int> &tmp = poses[keys[i]];
      int pos = lower_bound(tmp.begin(), tmp.end(), i) - tmp.begin();
      if (pos == 0) {
        for (k = 1; k < tmp.size(); k++) {
          dp[tmp[k]] = min(dp[tmp[k]], dp[i] + 1);
        }
      } else {
        if (pos + 1 < tmp.size()) {
          dp[tmp[pos + 1]] = min(dp[tmp[pos + 1]], dp[i] + 1);
        }
      }
    }
    for (j = 0; j < 26; j++) {
      int key = hantenBit(keys[i], j);
      if (poses.find(key) != poses.end()) {
        vector<int> &tmp = poses[key];
        int pos = upper_bound(tmp.begin(), tmp.end(), i) - tmp.begin();
        if (pos == 0) {
          for (k = 0; k < tmp.size(); k++) {
            dp[tmp[k]] = min(dp[tmp[k]], dp[i] + 1);
          }
        } else {
          if (pos < tmp.size()) {
            dp[tmp[pos]] = min(dp[tmp[pos]], dp[i] + 1);
          }
        }
      }
    }
  }
  cout << dp[s.length()] << endl;
  return 0;
}
