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