#include <bits/stdc++.h>
using namespace std;
const int N = 200000 + 10;
int cnt[N][26], dp[N];
int main() {
  string s;
  cin >> s;
  int ans = 0;
  cnt[0][s[0] - 'a']++;
  for (int i = 1; i < s.size(); i++) {
    for (int j = 0; j < 26; j++) cnt[i][j] = cnt[i - 1][j];
    cnt[i][s[i] - 'a']++;
  }
  for (int i = 0; i < s.size(); i++) {
    dp[i] = i + 1;
    int even = 0;
    for (int k = 0; k < 26; k++)
      if (cnt[i][k] & 1) even++;
    if (even <= 1) dp[i] = min(dp[i], 1);
    for (int j = 0; j < i; j++) {
      even = 0;
      for (int k = 0; k < 26; k++)
        if ((cnt[i][k] - cnt[j][k]) & 1) even++;
      if (even <= 1) {
        dp[i] = min(dp[i], dp[j] + 1);
      }
    }
  }
  cout << dp[s.size() - 1] << endl;
  return 0;
}
