#include <bits/stdc++.h>
using namespace std;
map<int, set<int> > mp;
int n, m, i, j, k, c[200005], lst, ans, cnt, dp[200005];
string st;
int main() {
  cin >> st;
  st = " " + st;
  n = st.length();
  for (i = 1; i < n; i++) {
    c[i] = c[i - 1] ^ (1 << (st[i] - 'a'));
    mp[c[i]].insert(i);
    dp[i] = n * 20;
  }
  if (c[n - 1] == 0) {
    cout << 1;
    return 0;
  }
  lst = 0;
  for (k = 0; k < n; k++) {
    mp[c[k]].erase(k);
    if (dp[k] > n) continue;
    for (i = 0; i < 26; i++) {
      int msk = c[k] ^ (1 << i);
      if (mp.count(msk) && (!mp[msk].empty())) {
        set<int> s = mp[msk];
        int j = 1;
        for (set<int>::reverse_iterator it = s.rbegin();
             j <= 5 && it != s.rend(); it++, j++) {
          dp[*it] = min(dp[*it], dp[k] + 1);
        }
        j = 1;
        for (set<int>::iterator it = s.begin(); j <= 5 && it != s.end();
             it++, j++) {
          dp[*it] = min(dp[*it], dp[k] + 1);
        }
      }
    }
  }
  cout << dp[n - 1];
  return 0;
}
