#include <bits/stdc++.h>
using namespace std;
void input(string &);
int func(int, string &);
int find(int, int, string &);
vector<int> dp;
int main() {
  string str;
  input(str);
  cout << func(0, str) << endl;
  return 0;
}
int func(int place, string &str) {
  if (place == str.size()) {
    return 0;
  }
  if (dp[place] >= 0) {
    return dp[place];
  }
  int res = (1 << 31) - 1;
  int useplace = find(place, 0, str);
  if (useplace >= 0) {
    res = func(useplace + 1, str) + 1;
  }
  for (int i = 0; i < 26; ++i) {
    useplace = find(place, 1 << i, str);
    if (useplace >= 0) {
      res = min(func(useplace + 1, str) + 1, res);
    }
  }
  dp[place] = res;
  return res;
}
int find(int place, int use, string &str) {
  int num = 0;
  int lastcan = -1;
  for (int i = place; i < str.size(); ++i) {
    num ^= 1 << (str[i] - 'a');
    if (use == num) {
      lastcan = i;
    }
  }
  return lastcan;
}
void input(string &str) {
  cin >> str;
  dp.resize(str.size() + 1, -1);
}
