#include <bits/stdc++.h>
using namespace std;
char str[200111];
map<pair<int, int>, int> dp;
int n;
int fun(int x, int bitmask) {
  if (x == n && __builtin_popcount(bitmask) <= 1) return 1;
  if (x == n) return 1e9;
  pair<int, int> p = make_pair(x, bitmask);
  if (dp.count(p)) return dp[p];
  int cur = 1e9;
  bitmask ^= (1 << (str[x] - 'a'));
  cur = min(cur, fun(x + 1, bitmask));
  if (__builtin_popcount(bitmask) <= 1) cur = min(cur, fun(x + 1, 0) + 1);
  dp[p] = cur;
  return cur;
}
int main() {
  scanf("%s", str);
  n = strlen(str);
  printf("%d\n", fun(0, 0));
  return 0;
}
