#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
constexpr int M = 1e9 + 7;
constexpr int INF = 1e9;
int main() {
  string s;
  cin >> s;
  int const n = s.size();
  vector<int> state(n + 1);
  for (int i = 0; i < n; ++i) {
    state[i + 1] = state[i] ^ (1 << (s[i] - 'a'));
  }
  vector<int> dp(n + 1, INF);
  dp[0] = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j <= i; ++j) {
      if (__builtin_popcount(state[j] ^ state[i + 1]) <= 1) {
        dp[i + 1] = min(dp[i + 1], dp[j] + 1);
        break;
      }
    }
  }
  cout << dp[n] << endl;
}
