#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 200005;
int sm[MAX_N];
int dp[MAX_N];
int n;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  n = (int)(s).size();
  sm[0] = 0;
  for (int i = (int)(1); i < (int)((int)(s).size() + 1); ++i) {
    sm[i] = sm[i - 1] ^ (1 << (s[i - 1] - 'a'));
  }
  for (int i = 0; i < (int)(n + 1); ++i) {
    dp[i] = 1000000005;
  }
  dp[0] = 0;
  for (int i = 0; i < (int)(n); ++i) {
    if (__builtin_popcount(sm[i + 1] ^ sm[0]) <= 1) {
      dp[i + 1] = min(dp[i + 1], 1);
    }
    for (int j = (int)(1); j < (int)(i + 1); ++j) {
      if (__builtin_popcount(sm[i + 1] ^ sm[j]) <= 1) {
        dp[i + 1] = min(dp[i + 1], dp[j] + 1);
      }
    }
  }
  cout << dp[n] << "\n";
  return 0;
}
