#include <bits/stdc++.h>
using namespace std;
struct Dijkstra {
  long long int INF = 1000000000000000009;
  long long int MAX_V = 1000000;
  long long int st = -1;
  struct edge {
    long long int to, cost;
  };
  vector<vector<edge>> G;
  vector<long long int> pre, d;
  priority_queue<pair<long long int, long long int>,
                 vector<pair<long long int, long long int>>,
                 greater<pair<long long int, long long int>>>
      que;
  Dijkstra(long long int s) {
    G.resize(s + 2);
    pre.resize(s + 2, -1);
    d.resize(s + 2, INF);
  }
  inline void insert(long long int a, long long int b, long long int c) {
    G[a].push_back(edge{b, c});
  }
  void init() {
    for (int i = 0; i < d.size(); i++) pre[i] = -1, d[i] = INF;
  }
  void dijkstra(int start) {
    init();
    st = start;
    d[start] = 0;
    que.push(pair<long long int, long long int>(0, start));
    while (!que.empty()) {
      pair<long long int, long long int> p_now = que.top();
      que.pop();
      long long int v = p_now.second;
      if (d[v] < p_now.first) continue;
      for (int i = 0; i < G[v].size(); i++) {
        edge e = G[v][i];
        if (d[e.to] > d[v] + e.cost) {
          d[e.to] = d[v] + e.cost;
          pre[e.to] = v;
          que.push(pair<long long int, long long int>(d[e.to], e.to));
        }
      }
    }
  }
  vector<long long int> get_path(int now) {
    vector<long long int> ret;
    while (now != -1) {
      ret.push_back(now);
      now = pre[now];
    }
    return ret;
  }
};
int main(int argc, char const *argv[]) {
  string s;
  std::cin >> s;
  long long int n = s.size(), num = 0;
  multiset<vector<long long int>> st;
  vector<long long int> m(n);
  for (int i = 0; i < n; i++) {
    num ^= (1 << (s[i] - 'a'));
    m[i] = num;
    st.insert(vector<long long int>{num, i});
  }
  st.insert(vector<long long int>{0, -1});
  Dijkstra dj(300000);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 27; j++) {
      long long int t = m[i];
      t = (j == 26 ? t : t ^ (1 << j));
      auto itr = st.lower_bound(vector<long long int>{t, -1});
      if (itr == st.end() || (*itr)[0] != t || (*itr)[1] >= i) continue;
      dj.insert((*itr)[1] + 1, i + 1, (j == 26 && t != 0 ? 0 : 1));
    }
  }
  dj.dijkstra(0);
  std::cout << dj.d[n] << '\n';
  return 0;
}
