#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using uint = unsigned int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using ull = unsigned long long;
using ld = long double;
template <typename T>
void _(const char* s, T h) {
  cerr << s << " = " << h << "\n";
}
template <typename T, typename... Ts>
void _(const char* s, T h, Ts... t) {
  int b = 0;
  while (((b += *s == '(') -= *s == ')') != 0 || *s != ',') cerr << *s++;
  cerr << " = " << h << ",";
  _(s + 1, t...);
}
struct init {
  init() {
    cin.tie(0);
    iostream::sync_with_stdio(0);
    cout << fixed << setprecision(10);
    cerr << fixed << setprecision(5);
  }
  ~init() {}
} init;
template <typename T, typename U>
void upx(T& x, U y) {
  if (x < y) x = y;
}
template <typename T, typename U>
void upn(T& x, U y) {
  if (x > y) x = y;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const ll D = 4, dx[] = {+1, 0, -1, 0}, dy[] = {0, +1, 0, -1};
const ll N = 2e5 + 5;
ll p[N], dp[N];
int32_t main() {
  string second;
  cin >> second;
  ll n = ((ll)(second).size());
  second = "#" + second;
  vector<ll> v = {0};
  for (ll i = 0; i < (26); ++i) v.emplace_back(1 << i);
  unordered_map<ll, ll> m;
  for (ll i = 1; i <= n; ++i) {
    ll x = second[i] - 'a';
    p[i] = p[i - 1] ^ (1 << x);
    m[p[i]] = i;
  }
  for (ll i = n; i >= 1; --i) {
    dp[i] = N;
    for (ll j : v) {
      ll tar = j ^ p[i - 1];
      auto it = m.find(tar);
      if (it != m.end() && it->second >= i) upn(dp[i], dp[it->second + 1] + 1);
    }
  }
  cout << dp[1] << '\n';
  return 0;
}
