#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  string S;
  cin >> S;
  long long N = S.size();
  vector<long long> R(N, N + 1);
  vector<long long> dp(N + 1, N * 2);
  dp[N] = 0;
  vector<long long> C(26, 0);
  long long r = 0;
  long long d = 0;
  long long x = 0;
  long long y;
  map<long long, vector<long long> > mp;
  mp[0].push_back(0);
  for (long long i = 0; i < N; i++) {
    y = (long long)1 << (long long)(S[i] - 'a');
    if (mp.count(x ^ y) != 0) {
      for (auto xx : mp[x ^ y]) {
        R[xx] = i + 1;
      }
      mp[x ^ y].clear();
    }
    x = x ^ y;
    mp[x].push_back(i + 1);
  }
  for (long long i = 0; i < N; i++) {
  }
  long long t = N;
  for (long long i = N - 1; i >= 0; i--) {
    if (R[i] == t) {
      dp[i] = 1;
      if (i > 0) {
        dp[i - 1] = 1;
      }
      t = i;
    }
  }
  for (long long i = N - 1; i >= 0; i--) {
    if (R[i] > N) {
      dp[i] = min(dp[i], dp[i + 1] + 1);
    } else {
      if (R[i] == N) {
        dp[i] = 1;
        if (i > 0) {
          dp[i - 1] = 1;
        }
      } else {
        dp[i] = min(min(dp[i], dp[i + 1] + 1), dp[R[i]]);
      }
    }
  }
  for (long long i = 0; i < N; i++) {
  }
  cout << dp[0] << endl;
}
