#include <bits/stdc++.h>
using namespace std;
using Complex = complex<double>;
using ll = long long;
template <typename T>
using min_priority_queue = priority_queue<T, vector<T>, greater<T>>;
const ll inf = 1145141919810364364LL;
double PI = acos(-1.0);
string S;
int sum[26];
ll dp[202020];
ll memo[1 << 26];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> S;
  int N = S.size();
  for (int i = 0; i < (1 << 26); i++) memo[i] = (1LL << 52) - 1;
  for (int i = 1; i <= N; i++) {
    for (int j = 0; j < 26; j++) sum[j] = sum[j] + (S[i - 1] - 'a' == j);
    int mask = 0;
    int bitcnt = 0;
    for (int j = 0; j < 26; j++) {
      if (sum[j] % 2) {
        mask += (1 << j);
        bitcnt++;
      }
    }
    ll pre = memo[mask] >> 26;
    ll suf = memo[mask] - (pre << 26);
    ll mi = inf;
    for (int j = 0; j < 26; j++) {
      ll prej = memo[mask ^ (1 << j)] >> 26;
      ll sufj = memo[mask ^ (1 << j)] - (prej << 26);
      mi = min(mi, (i % 2 == 0) ? sufj : prej);
    }
    if (bitcnt <= 1)
      dp[i] = 0;
    else
      dp[i] = min((i % 2 == 0) ? pre : suf, mi) + 1;
    ((i % 2 == 0) ? pre : suf) = min(dp[i], (i % 2 == 0) ? pre : suf);
    memo[mask] = (pre << 26) + suf;
  }
  cout << dp[N] + 1 << endl;
  return 0;
}
