#include <bits/stdc++.h>
const int dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const int dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
using namespace std;
long long max(long long a, int b) { return max(a, long long(b)); }
long long max(int a, long long b) { return max(long long(a), b); }
long long min(long long a, int b) { return min(a, long long(b)); }
long long min(int a, long long b) { return min(long long(a), b); }
string s;
int n;
int dfs(vector<int> &dp, vector<int> &pos, vector<int> &bit, int i) {
  if (i == n) return 0;
  if (dp[i] != -1) return dp[i];
  int ret = 1000000001ll;
  int b = bit[n] ^ bit[i];
  int popcount = 0;
  for (long long j = 0; j < long long(26); ++j) {
    if ((1 << j) & b) popcount++;
  }
  if (popcount <= 1) return dp[i] = 1;
  b = bit[i];
  if (pos[b] >= i) ret = min(ret, 1 + dfs(dp, pos, bit, pos[b] + 1));
  for (long long k = 0; k < long long(26); ++k) {
    int c = b ^ (1 << k);
    if (pos[c] >= i) ret = min(ret, 1 + dfs(dp, pos, bit, pos[c] + 1));
  }
  return dp[i] = ret;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> s;
  n = s.size();
  vector<int> bit(n + 1);
  vector<int> pos(1 << 26, -1);
  bit[0] = 0;
  for (long long i = 0; i < long long(n); ++i) {
    bit[i + 1] = bit[i] ^ (1 << (s[i] - 'a'));
    pos[bit[i + 1]] = i;
  }
  vector<int> dp(n, -1);
  for (long long i = 0; i < long long(n); ++i) dfs(dp, pos, bit, i);
  cout << dp[0] << endl;
}
