#include <bits/stdc++.h>
using namespace std;
long long pwr(long long base, long long p, long long mod = (1000000007LL)) {
  long long ans = 1;
  while (p) {
    if (p & 1) ans = (ans * base) % mod;
    base = (base * base) % mod;
    p /= 2;
  }
  return ans;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
const int N = 200002;
int n, minpos[1 << 27], DP[1 << 27];
char str[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> (str + 1);
  n = strlen(str + 1);
  for (int mask = 0; mask < (1 << 26); mask++) minpos[mask] = (1000000007LL);
  DP[0] = 0;
  minpos[0] = 0;
  int mask = 0;
  for (int i = 1; i <= n; i++) {
    mask ^= (1 << (str[i] - 'a'));
    DP[i] = 1 + DP[i - 1];
    if (minpos[mask] != (1000000007LL))
      DP[i] = min(DP[i], 1 + DP[minpos[mask]]);
    for (int j = 0; j < 26; j++)
      if (minpos[mask ^ (1 << j)] != (1000000007LL))
        DP[i] = min(DP[i], 1 + DP[minpos[mask ^ (1 << j)]]);
    minpos[mask] = min(minpos[mask], i);
  }
  assert(DP[n] != (1000000007LL));
  cout << DP[n];
  return 0;
}
