#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using V = vector<int>;
using Vll = vector<ll>;
using Vld = vector<ld>;
using Vbo = vector<bool>;
using VV = vector<V>;
using VVll = vector<Vll>;
using VVld = vector<Vld>;
using VVbo = vector<Vbo>;
using VVV = vector<VV>;
using VVVll = vector<VVll>;
using P = pair<int, int>;
using Pll = pair<ll, ll>;
using Pld = pair<ld, ld>;
struct fast_ios {
  fast_ios() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
  };
} fast_ios_;
template <typename T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) {
  is >> p.first >> p.second;
  return is;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
  os << "(" << p.first << ", " << p.second << ")";
  return os;
}
template <typename T>
istream &operator>>(istream &is, vector<T> &v) {
  for (auto &e : v) is >> e;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  for (auto &e : v) os << e << " ";
  return os;
}
template <typename T>
inline int count_between(vector<T> &a, T l, T r) {
  return lower_bound(a.begin(), a.end(), r) -
         lower_bound(a.begin(), a.end(), l);
}
inline int Log2(ll x) {
  int k;
  for (k = 0; x > 0; ++k) x >>= 1;
  return k;
}
const int INF = 1 << 30;
const ll INFll = 1ll << 62;
const ld EPS = 1e-10;
const ld PI = acos(-1.0);
const int MOD = int(1e9) + 7;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  map<ll, int> idx;
  Vll c(n + 1);
  for (int i = int(0); i < int(n); ++i) {
    int x = s[i] - 'a';
    c[i + 1] = c[i] ^ (1ll << x);
  }
  for (int i = int(n + 1) - 1; i >= int(0); --i) idx[c[i]] = i;
  V dp(n + 1, INF);
  dp[0] = 0;
  for (int i = int(1); i < int(n + 1); ++i) {
    int j = idx[c[i]];
    if (j < i) chmin(dp[i], dp[j] + 1);
    for (int x = int(0); x < int(26); ++x) {
      int y = c[i] ^ (1ll << x);
      if (idx.find(y) == idx.end()) continue;
      int j = idx[y];
      if (j < i) chmin(dp[i], dp[j] + 1);
    }
  }
  int ans = dp[n];
  cout << ans << "\n";
  return 0;
}
