#include <bits/stdc++.h>
using namespace std;
int in() {
  int x;
  scanf("%d", &x);
  return x;
}
long long lin() {
  long long x;
  scanf("%lld", &x);
  return x;
}
long long MOD = 1e9 + 7;
int main() {
  string ss;
  cin >> ss;
  int n = ss.size();
  vector<int> dp(n + 2, 1e9 + 7);
  vector<int> s;
  for (long long i = 0; i < n; i++) {
    s.push_back((int)(ss[i] - 'a'));
  }
  map<vector<int>, int> m;
  vector<int> counter(26);
  for (long long i = 1; i <= n; ++i) {
    counter[s[i - 1]] ^= 1;
    m[counter] = i;
  }
  int flag = 1;
  for (long long i = 0; i < 26; i++) flag -= counter[i];
  if (flag >= 0) {
    cout << 1 << "\n";
    return 0;
  }
  counter = vector<int>(26);
  dp[0] = 0;
  for (long long i = 0; i < n + 1; i++) {
    for (long long j = 0; j < 26; j++) {
      vector<int> temp = counter;
      temp[j] ^= 1;
      dp[m[temp]] = min(dp[m[temp]], dp[i] + 1);
    }
    if (i < n) counter[s[i]] ^= 1;
  }
  cout << dp[n] << "\n";
  return 0;
}
