#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using PII = pair<int, int>;
using PLL = pair<ll, ll>;
template <typename T1, typename T2>
ostream& operator<<(ostream& s, const pair<T1, T2>& p) {
  return s << "(" << p.first << ", " << p.second << ")";
}
template <typename T>
ostream& operator<<(ostream& s, const vector<T>& v) {
  s << "[";
  for (int i = 0; i < v.size(); i++) s << (i == 0 ? "" : ", ") << v[i];
  s << "]";
  return s;
}
int main() {
  string s;
  cin >> s;
  static int even[26];
  for (char ch : s) {
    even[ch - 'a'] ^= 1;
  }
  bool flag = true;
  for (char ch = 'a'; ch <= 'z'; ch++) {
    if (even[ch - 'a']) flag = false;
  }
  if (flag) {
    cout << 1 << endl;
    return 0;
  }
  const int MAXN = 300000;
  static int mask[MAXN];
  int N = s.size();
  for (int i = 0; i < N; i++) {
    mask[i] = 1 << (s[i] - 'a');
    if (i > 0) mask[i] ^= mask[i - 1];
  }
  static int link[(1 << 26)];
  static int dp[MAXN];
  memset(link, -1, sizeof(link));
  for (int i = 0; i <= N; i++) dp[i] = (1 << 28);
  dp[N] = 0;
  for (int i = N - 1; i >= 0; i--) {
    link[mask[i]] = max(link[mask[i]], i);
    int mine = mask[i] ^ (1 << (s[i] - 'a'));
    for (int j = 0; j < 26; j++) {
      int nmask = mine ^ (1 << j);
      if (link[nmask] < 0) continue;
      dp[i] = min(dp[i], 1 + dp[link[nmask] + 1]);
    }
  }
  cout << dp[0] << endl;
  return 0;
}
