#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int ans;
int N;
int idx;
string S;
int sum[212345];
int dp[212345];
int main() {
  cin >> S;
  N = S.size();
  idx = S[0] - 'a';
  sum[0] = 1 << idx;
  for (long long i = (1); i < (N); i++) {
    idx = S[i] - 'a';
    sum[i] = sum[i - 1] ^ (1 << idx);
  }
  for (long long i = (0); i < (N); i++) {
    int cnt = 0;
    for (long long k = (0); k < (26); k++) {
      if (sum[i] & 1 << k) cnt++;
    }
    if (cnt < 2) {
      dp[i] = 1;
      continue;
    }
    dp[i] = i + 1;
    for (long long j = (0); j < (i); j++) {
      int num = sum[i] ^ sum[j];
      cnt = 0;
      for (long long k = (0); k < (26); k++) {
        if (num & 1 << k) cnt++;
      }
      if (cnt < 2) {
        dp[i] = min(dp[i], dp[j] + 1);
      } else {
        j += cnt - 2;
      }
    }
  }
  cout << dp[N - 1] << endl;
  return 0;
}
