#include <bits/stdc++.h>
using namespace std;
map<int, vector<int> > v;
int mark[200010];
int dp[200010];
int main() {
  string s;
  cin >> s;
  int r = 1;
  for (int i = 0; i < 26; i++) r *= 2;
  for (int i = 0; i < s.size() + 1; i++) dp[i] = 1000000007;
  dp[0] = 0;
  mark[0] = 0;
  int cnt[26] = {0};
  for (int i = 0; i < s.size(); i++) {
    cnt[s[i] - 'a']++;
    cnt[s[i] - 'a'] %= 2;
    int tmp = 0;
    int a = 1;
    for (int j = 0; j < 26; j++) {
      tmp += a * cnt[j];
      a *= 2;
    }
    v[tmp].push_back(i + 1);
    mark[i + 1] = tmp;
  }
  for (int i = 0; i < s.size(); i++) {
    int k = mark[i];
    if (upper_bound(v[k].begin(), v[k].end(), i) != v[k].end()) {
      int it = *upper_bound(v[k].begin(), v[k].end(), i);
      dp[it] = min(dp[it], dp[i]);
    }
    int a = 1;
    for (int j = 0; j < 26; j++) {
      int tmp = mark[i];
      if (mark[i] % (a * 2) < a) {
        tmp += a;
      } else
        tmp -= a;
      a *= 2;
      k = tmp;
      if (upper_bound(v[k].begin(), v[k].end(), i) != v[k].end()) {
        int it = *upper_bound(v[k].begin(), v[k].end(), i);
        dp[it] = min(dp[it], dp[i] + 1);
      }
    }
  }
  cout << max(1, dp[s.size()]) << endl;
  return 0;
}
