#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll LINF = 1001002003004005006ll;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return true;
  }
  return false;
}
int pre[1 << 26];
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  for (int i = 0; i < ((1 << 26)); i++) pre[i] = -1;
  pre[0] = 0;
  string s;
  cin >> s;
  int n = (int)s.size();
  int dp[n + 1];
  for (int i = 0; i < (n + 1); i++) dp[i] = 1000000000;
  dp[0] = 0;
  int bit = 0;
  for (int i = 0; i < (n); i++) {
    int c = s[i] - 'a';
    bit ^= (1 << c);
    if (__builtin_popcount(bit) <= 1)
      dp[i + 1] = 0;
    else {
      if (pre[bit] >= 0) chmin(dp[i + 1], dp[pre[bit]] + 1);
      for (int j = 0; j < (26); j++) {
        if ((bit >> j) & 1 and pre[bit ^ (1 << j)] >= 0) {
          chmin(dp[i + 1], dp[pre[bit ^ (1 << j)]] + 1);
        }
      }
    }
    pre[bit] = i + 1;
  }
  cout << dp[n] + 1 << endl;
  return 0;
}
