#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int inf = 1e9 + 10;
const long long INF = 1e18;
const long double EPS = 1e-10;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(25);
  string s;
  cin >> s;
  int n = s.length();
  vector<long long> dp(n + 1, INF);
  dp[n] = 0;
  map<int, int> mp;
  mp[0] = n;
  int res = 0;
  for (int i = (n - 1); i >= 0; --i) {
    chmin(dp[i], dp[i + 1] + 1);
    int t = s[i] - 'a';
    res ^= (1 << t);
    if (mp[res])
      chmin(dp[i], dp[mp[res]] + 1);
    else
      mp[res] = i;
    for (int j = 0; j < (26); ++j) {
      int res2 = res ^ (1 << j);
      if (mp[res2]) chmin(dp[i], dp[mp[res2]] + 1);
    }
  }
  cout << dp[0] << '\n';
  return 0;
}
