#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 10;
long long cnt[maxn][26], dp[maxn], n;
string s;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  memset(dp, 0, sizeof(dp));
  memset(cnt, 0, sizeof(cnt));
  cin >> s;
  n = s.length();
  for (long long i = 1; i <= n; i++) {
    cnt[i][s[i - 1] - 'a']++;
    for (long long j = 0; j < 26; j++) {
      cnt[i][j] += cnt[i - 1][j];
    }
  }
  dp[n + 1] = 0;
  set<pair<long long, long long>> st;
  st.insert({0, n + 1});
  for (long long i = n; i >= 1; i--) {
    for (auto [v, x] : st) {
      long long c = 0;
      for (long long j = 0; j < 26; j++) {
        c += (cnt[x - 1][j] - cnt[i - 1][j]) & 1;
      }
      if (c <= 1) {
        dp[i] = dp[x] + 1;
        st.insert({dp[i], i});
        break;
      }
    }
  }
  cout << dp[1];
}
