#include <bits/stdc++.h>
using namespace std;
int dp[200010];
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  int N = s.size();
  for (int i = 0; i < N + 2; i++) {
    dp[i] = i;
  }
  int bit = 0;
  map<int, int> m;
  m[0] = 0;
  dp[0] = 0;
  for (int i = 0; i < N; i++) {
    dp[i + 1] = dp[i] + 1;
    int id = s[i] - 'a';
    int zero = bit;
    if (m.count(zero)) {
      dp[i + 1] = min(dp[i + 1], m[zero] + 1);
    }
    int one = bit ^ (1 << id);
    if (m.count(one)) {
      dp[i + 1] = min(dp[i + 1], m[one] + 1);
    }
    for (int j = 0; j < 26; j++) {
      if (j == id) continue;
      one = bit ^ (1 << id) ^ (1 << j);
      if (m.count(one)) {
        dp[i + 1] = min(dp[i + 1], m[one] + 1);
      }
    }
    if (!m.count(bit)) {
      m[bit] = dp[i];
    }
    bit ^= 1 << id;
  }
  cout << dp[N] << endl;
}
