#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long INFF = 0x3f3f3f3f3f3f3f3fll;
const int MAX = 3e5 + 10;
const long long MOD = 1e9 + 7;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
template <typename T>
inline T abs(T a) {
  return a > 0 ? a : -a;
}
template <class T>
inline void read(T& num) {
  bool start = false, neg = false;
  char c;
  num = 0;
  while ((c = getchar()) != EOF) {
    if (c == '-')
      start = neg = true;
    else if (c >= '0' && c <= '9') {
      start = true;
      num = num * 10 + c - '0';
    } else if (start)
      break;
  }
  if (neg) num = -num;
}
inline long long powMM(long long a, long long b, long long M) {
  long long ret = 1;
  a %= M;
  while (b) {
    if (b & 1) ret = ret * a % M;
    b >>= 1;
    a = a * a % M;
  }
  return ret;
}
void open() { freopen("out.txt", "w", stdout); }
char a[MAX];
int st[MAX];
int dp[MAX];
map<int, int> last;
set<int> s;
vector<int> er;
int id(char x) { return x - 'a'; }
int now;
int an, pos;
int main() {
  scanf("%s", a);
  now = 1;
  s.insert(now);
  er.push_back(now);
  for (int i = 1; i <= 25; i++) {
    now *= 2;
    er.push_back(now);
    s.insert(now);
  }
  memset(dp, 0x3f, sizeof(dp));
  int len = strlen(a);
  st[0] = (1 << id(a[0]));
  last[st[0]] = 1;
  dp[0] = 1;
  for (int i = 1; i < len; i++) {
    st[i] = st[i - 1] ^ (1 << id(a[i]));
    if (!st[i] || s.count(st[i])) {
      dp[i] = 1;
      if (!last[st[i]]) last[st[i]] = i + 1;
      continue;
    }
    for (int j = 0; j < 26; j++) {
      int who = st[i] ^ er[j];
      if (last[who]) {
        pos = last[who] - 1;
        dp[i] = min(dp[i], dp[pos] + 1);
      }
    }
    if (last[st[i]])
      dp[i] = min(dp[i], dp[last[st[i]] - 1] + 1);
    else
      last[st[i]] = i + 1;
  }
  printf("%d\n", dp[len - 1]);
  return 0;
}
