#include <bits/stdc++.h>
using namespace std;
int n, memo[200005];
unordered_map<int, int> freq, pos;
string s;
int cnt(int k, int sum = 0) {
  for (int i = 0; i < 26; sum += !!(k & (1 << i++))) {
  }
  return sum;
}
int get(int idx) {
  if (pos.find(idx) == pos.end()) return s.size() + 1;
  return pos[idx];
}
int solve(int idx) {
  if (memo[idx] != -1) return memo[idx];
  if (cnt(freq[idx]) < 2) return memo[idx] = 1;
  int j = pos[freq[idx]], ans = 1e9;
  if (j < idx) ans = min(ans, solve(j));
  for (int k = 0; k < 26; ++k) {
    int i = get(freq[idx] ^ (1 << k));
    if (i < idx) ans = min(ans, solve(i));
  }
  return memo[idx] = ++ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long q, m, k, h, ans = 0, sum = 0, p, x, y;
  cin >> s;
  freq[-1] = 0;
  pos[0] = -1;
  for (int i = 0; i < 200005; memo[i++] = -1) {
  }
  for (int i = 0; i < s.size(); ++i) {
    freq[i] = freq[i - 1] ^ (1 << (s[i] - 'a'));
    if (pos.find(freq[i]) != pos.end())
      pos[freq[i]] = min(pos[freq[i]], i);
    else
      pos[freq[i]] = i;
  }
  cout << solve(s.size() - 1);
}
