#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void output(T a, int p = 0) {
  if (p)
    cout << fixed << setprecision(p) << a << "\n";
  else
    cout << a << "\n";
}
template <typename T>
inline void voutput(T &v) {
  for (int i = (int)(0); i < (int)(v.size()); ++i) {
    if (i)
      cout << " " << v[i];
    else
      cout << v[i];
  }
  cout << endl;
}
long long code(vector<int> &A) {
  long long ret = 0;
  for (int i = (int)(0); i < (int)(A.size()); ++i) {
    ret += (1 << i) * A[i];
  }
  return ret;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  string s;
  cin >> s;
  vector<int> A(26, 0);
  map<long long, int> M;
  vector<long long> C(s.size() + 1);
  M[0] = 0;
  C[0] = 0;
  for (int i = (int)(0); i < (int)(s.size()); ++i) {
    A[s[i] - 'a'] ^= 1;
    if (M.count(code(A)) == 0) M[code(A)] = i + 1;
    C[i + 1] = code(A);
  }
  vector<int> dp(s.size() + 1, 2000000007);
  dp[0] = 0;
  for (int i = (int)(1); i < (int)(s.size() + 1); ++i) {
    if (M.count(C[i])) {
      dp[i] = min(dp[i], dp[M[C[i]]] + 1);
    }
    for (int j = (int)(0); j < (int)(26); ++j) {
      int c = C[i] ^ (1 << j);
      if (M.count(c)) {
        dp[i] = min(dp[i], dp[M[c]] + 1);
      }
    }
    dp[i] = min(dp[i], dp[i - 1] + 1);
  }
  output(dp[s.size()]);
  return 0;
}
