#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using u32 = uint32_t;
using vi = vector<int>;
using vvi = vector<vi>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vd = vector<double>;
using vvd = vector<vd>;
const ll mod = ((ll)1e9) + 7;
const ll INF = 1e9;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(50);
  string s;
  cin >> s;
  ll n = s.size();
  vector<int> tbl(1 << 26, -2);
  tbl[0] = -1;
  ll alp = 0;
  vl dp(n + 1, ((ll)1e10));
  dp[0] = 0;
  for (auto i = 0 * (n), i_len = (n); i < i_len; ++i) {
    alp ^= 1 << (s[i] - 'a');
    if (__builtin_popcountll(alp) == 0) {
      dp[i + 1] = 1;
    } else {
      for (auto j = 0 * (26), j_len = (26); j < j_len; ++j) {
        ll c = 1 << j;
        if (c & alp == 0) continue;
        if (tbl[alp ^ c] != -2)
          (dp[i + 1] = min(dp[i + 1], 1 + dp[tbl[alp ^ c] + 1]));
      }
    }
    if (tbl[alp] == -2) tbl[alp] = i;
  }
  cout << dp[n] << endl;
  return 0;
}
