#pragma GCC optimize ("O3")
#pragma GCC target ("avx")

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <map>

using namespace std;

void fast(string s) {
  const int n = s.size();
  const int inf = 1e9;
  vector<int> dp0((n + 1) / 2 + 1, inf);
  vector<int> dp1(n / 2 + 1, inf);
  dp0[0] = 0;

  vector<int> x(n + 1);
  vector<int> x0((n + 1) / 2 + 1);
  vector<int> x1(n / 2 + 1);
  for (int i = 0; i < n; i++) {
    x[i + 1] = x[i] ^ (1 << s[i] - 'a');
  }
  for (int i = 0; i <= n; i++) {
    if (i % 2 == 0) {
      x0[i >> 1] = x[i];
    } else {
      x1[i >> 1] = x[i];
    }
  }

  // dp0[i] = dp[i * 2]
  // dp1[i] = dp[i * 2 + 1]

  for (int i = 0; i < n; i++) {
    if (i % 2 == 0) {
      int v = dp0[i >> 1] + 1;
      for (int j = i >> 1; j <= n / 2; j++) {
        int u = x1[j] ^ x0[i >> 1];
        dp1[j] = min(dp1[j], u & u - 1 ? inf : v);
      }
    } else {
      int v = dp1[i >> 1] + 1;
      for (int j = (i >> 1) + 1; j <= (n + 1) / 2; j++) {
        int u = x0[j] ^ x1[i >> 1];
        dp0[j] = min(dp0[j], u & u - 1 ? inf : v);
      }
    }
  }

  if (n % 2 == 0) {
    cout << dp0[(n + 1) / 2] << endl;
  } else {
    cout << dp1[n / 2] << endl;
  }
}

int main() {
  string s;
  cin >> s;

  const int n = s.size();

  int hoge = 0;
  for (char c : s) hoge ^= 1 << c - 'a';
  if (hoge == 0) {
    cout << 1 << endl;
    return 0;
  }

  if (n <= 150000) {
    fast(n);
    return 0;
  }

  vector<int> x(n + 1);
  for (int i = 0; i < n; i++) {
    x[i + 1] = x[i] ^ (1 << s[i] - 'a');
  }

  map<int, vector<int>> mp;
  for (int i = 1; i <= n; i++) {
    mp[x[i]].push_back(i);
  }
 
  queue<int> q;
  q.push(0);
 
  vector<int> d(n + 1, 1e9);
  d[0] = 0;
 
  while (!q.empty()) {
    int i = q.front(); q.pop();
 
    for (int k = 0; k < 26; k++) {
      int y = x[i] ^ (1 << k);
      if (mp.count(y)) {
        int j = mp[y].back();
        mp[y].pop_back();
        if (mp[y].empty()) {
          mp.erase(y);
        }
        q.push(j);
        d[j] = d[i] + 1;
      }
    }
  }
 
  cout << d[n] << endl;
}
