#include <bits/stdc++.h>
using namespace std;
const int N = -1;
const int INF = 1.01e9;
const int ALF = 26;
int solve(string s) {
  int n = s.size();
  vector<long long> pref;
  pref.push_back(0);
  assert(ALF == 'z' - 'a' + 1);
  map<long long, int> dp;
  for (auto x : s) {
    pref.push_back(pref.back() ^ (1ll << (x - 'a')));
    assert('a' <= x && x <= 'z');
    dp[pref.back()] = INF;
  }
  auto upd = [](int& A, int B) { A = min(A, B); };
  dp[0] = 0;
  for (int i = 0; i < n; i++) {
    if (dp[pref[i]] < INF) {
      upd(dp[pref[i]], dp[pref[i]] + 1);
      for (int j = 0; j < ALF; j++) {
        upd(dp[pref[i] ^ (1ll << (j))], dp[pref[i]] + 1);
      }
    }
  }
  return max(1, dp[pref[n]]);
}
int slow(string s) {
  int n = s.size();
  vector<int> dp(n + 1, INF);
  dp[0] = 0;
  for (int i = 0; i < n; i++) {
    if (i >= INF) continue;
    for (int len = 1; len + i <= n; len++) {
      string t = s.substr(i, len);
      sort((t).begin(), (t).end());
      bool ok = 0;
      do {
        bool flag = 1;
        for (int j = 0; j < len; j++) {
          flag &= t[j] == t[len - 1 - j];
        }
        if (flag) {
          ok = 1;
          break;
        }
      } while (next_permutation((t).begin(), (t).end()));
      if (ok) {
        dp[i + len] = min(dp[i + len], dp[i] + 1);
      }
    }
  }
  return dp[n];
}
int main() {
  if (1) {
    string s;
    cin >> s;
    cout << solve(s) << endl;
  } else {
    for (int tt = 0;; tt++) {
      cerr << "tt"
           << " = " << tt << endl;
      int n = rand() % 10 + 1;
      string s;
      for (int i = 0; i < n; i++) {
        s.push_back('a' + rand() % 5);
      }
      int r1 = solve(s);
      int r2 = slow(s);
      cerr << "("
           << "s"
           << ", "
           << "r1"
           << ", "
           << "r2"
           << ") = (" << s << ", " << r1 << ", " << r2 << ")\n";
      assert(r1 == r2);
    }
  }
  return 0;
}
