#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ch = char;
const ll MOD = 1000000007;
const ll MOD2 = 998244353;
const ld PI = acos(-1);
const ll INF = 1e18;
struct edge {
  ll to, cost;
};
struct edge2 {
  ll from, to, cost;
};
template <typename T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
bool chmin(T& a, const T& b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  string s;
  cin >> s;
  ll n = s.size();
  vector<ll> dp(n + 1);
  vector<ll> acc(n + 1);
  acc[0] = 0;
  vector<int> first(1 << 26);
  for (ll i = 0; i < 1 << 26; i++) {
    first[i] = n;
  }
  first[0] = 0;
  ll now = 0;
  for (ll i = 0; i < n; i++) {
    now = (ll)pow(2, s[i] - 'a') + 1e-5;
    acc[i + 1] = acc[i] ^ now;
    if (first[acc[i + 1]] == n) {
      first[acc[i + 1]] = i + 1;
    }
  }
  for (ll i = 0; i < n + 1; i++) {
    dp[i] = n;
  }
  dp[0] = 0;
  for (ll i = 0; i < n; i++) {
    ll k = 1 << 25;
    for (ll j = 0; j < 26; j++) {
      if (i + 1 > first[acc[i + 1] ^ k])
        chmin(dp[i + 1], dp[first[acc[i + 1] ^ k]] + 1);
      k /= 2;
    }
  }
  cout << dp[n] << endl;
}
