#include <bits/stdc++.h>
using namespace std;
int n;
string str;
vector<int> G[200005];
map<vector<int>, int> mp;
int solve() {
  vector<int> key(26, 0);
  mp[key] = 0;
  for (int i = 0; i < n; i++) {
    key[str[i] - 'a']++;
    key[str[i] - 'a'] %= 2;
    if (mp.count(key) > 0) {
      G[mp[key]].push_back(i + 1);
    } else {
      mp[key] = i + 1;
    }
    vector<int> tmp = key;
    for (int j = 0; j < 26; j++) {
      key = tmp;
      key[j] ^= 1;
      if (mp.count(key) > 0) {
        G[mp[key]].push_back(i + 1);
      }
    }
  }
  const int INF = 1e9;
  vector<int> dp(n + 1, INF);
  dp[0] = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < (int)G[i].size(); j++) {
      int to = G[i][j];
      dp[to] = min(dp[to], dp[i] + 1);
    }
    dp[i + 1] = min(dp[i + 1], dp[i] + 1);
  }
  return dp[n];
}
int main() {
  cin >> str;
  n = str.size();
  cout << solve() << endl;
  return 0;
}
