#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 5;
int pre[26][MAX];
int dp[MAX];
int mask[MAX];
map<int, vector<int> > mp;
string s;
int solve(int pos) {
  if (pos == (s.length() + 1)) {
    return 0;
  }
  if (dp[pos] != -1) {
    return dp[pos];
  }
  int ans = s.length();
  vector<int> tmp = mp[mask[pos - 1]];
  int ps = lower_bound(tmp.begin(), tmp.end(), pos) - tmp.begin();
  for (int i = ps; i < tmp.size(); i++) {
    ans = min(1 + solve(tmp[i] + 1), ans);
  }
  for (int i = 0; i < 26; i++) {
    vector<int> tmp = mp[mask[pos - 1] ^ (1 << i)];
    int ps = lower_bound(tmp.begin(), tmp.end(), pos) - tmp.begin();
    for (int j = ps; j < tmp.size(); j++) {
      ans = min(1 + solve(tmp[j] + 1), ans);
    }
  }
  dp[pos] = ans;
  return ans;
}
int main() {
  memset(dp, -1, sizeof dp);
  cin >> s;
  pre[s[0] - 'a'][0] = 1;
  for (int i = 1; i < s.length(); i++) {
    for (int j = 0; j < 26; j++) {
      if ((s[i] - 'a') == j) {
        pre[j][i] = pre[j][i - 1] + 1;
      } else {
        pre[j][i] = pre[j][i - 1];
      }
    }
  }
  for (int i = 0; i < s.length(); i++) {
    int msk = 0;
    for (int j = 0; j < 26; j++) {
      if (pre[j][i] % 2) {
        msk ^= (1 << j);
      }
    }
    mp[msk].push_back(i + 1);
    mask[i + 1] = msk;
  }
  printf("%d\n", solve(1));
  return 0;
}
