#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
const double EPS = 1e-9;
const long long INF = 10e17;
double equal(double a, double b) { return fabs(a - b) < DBL_EPSILON; }
std::istream &operator>>(std::istream &in, set<int> &o) {
  int a;
  in >> a;
  o.insert(a);
  return in;
}
std::istream &operator>>(std::istream &in, queue<int> &o) {
  long long a;
  in >> a;
  o.push(a);
  return in;
}
bool contain(set<int> &s, int a) { return s.find(a) != s.end(); }
int rev(int bit, int i) { return bit ^ (1 << i); }
int main() {
  string s;
  cin >> s;
  int n = s.size();
  vector<long long> dp(n + 1, INF);
  vector<long long> mval(1ll << 26, INF);
  dp[0] = 0;
  mval[0] = 0;
  long long par = 0;
  for (long long i = 1; i <= n; i++) {
    par = rev(par, s[i - 1] - 'a');
    dp[i] = min(dp[i], mval[par] + 1);
    for (int j = 0; j < 26; j++) {
      par = rev(par, j);
      dp[i] = min(dp[i], mval[par] + 1);
      par = rev(par, j);
    }
    mval[par] = min(mval[par], dp[i]);
  }
  cout << dp[n] << endl;
}
