#include <bits/stdc++.h>
using namespace std;
int MAX_N = 200010;
long long INF = 1LL << 60;
vector<vector<pair<int, int>>> edges(MAX_N);
vector<long long> dist(MAX_N, INF);
void dijkstra(int s) {
  priority_queue<pair<int, int>, vector<pair<int, int>>,
                 greater<pair<int, int>>>
      que;
  dist[s] = 0;
  que.push(pair<int, int>(0, s));
  while (!que.empty()) {
    pair<int, int> p = que.top();
    que.pop();
    int v = p.second;
    if (dist[v] < p.first) continue;
    for (int i = 0; i < edges[v].size(); ++i) {
      pair<int, int> e = edges[v][i];
      if (dist[e.first] > dist[v] + e.second) {
        dist[e.first] = dist[v] + e.second;
        que.push(pair<int, int>(dist[e.first], e.first));
      }
    }
  }
}
int main() {
  string s;
  cin >> s;
  int n = s.size();
  unordered_map<int, int> mp;
  mp.reserve(200010);
  int t = 0;
  mp[0] = 0;
  for (int i = 0; i < n; ++i) {
    t ^= (1 << (s[i] - 'a'));
    for (int j = 0; j < 26; ++j)
      if (mp.find(t ^ (1 << j)) != mp.end()) {
        edges[mp[t ^ (1 << j)]].push_back((pair<int, int>(i + 1, 1)));
      }
    if (mp.find(t) != mp.end())
      edges[mp[t]].push_back(pair<int, int>(i + 1, 1));
    else
      mp[t] = i + 1;
  }
  for (int i = 0; i < n; ++i)
    if (edges[i].empty()) edges[i].push_back(pair<int, int>(i + 1, 1));
  dijkstra(0);
  cout << dist[n] << endl;
  return 0;
}
