#include <bits/stdc++.h>
using namespace std;
int n;
unordered_map<int, int> freq, pos;
string s;
int cnt(int k, int sum = 0) {
  for (int i = 0; i < 26; sum += !!(k & (1 << i++))) {
  }
  return sum;
}
int get(int idx) {
  if (pos.find(idx) == pos.end()) return s.size() + 1;
  return pos[idx];
}
int solve() {
  freq.clear();
  pos.clear();
  long long q, m, k, h, ans = 0, sum = 0, p, x, y;
  freq[-1] = 0;
  pos[0] = -1;
  for (int i = 0; i < s.size(); ++i) {
    freq[i] = freq[i - 1] ^ (1 << (s[i] - 'a'));
    if (pos.find(freq[i]) != pos.end())
      pos[freq[i]] = min(pos[freq[i]], i);
    else
      pos[freq[i]] = i;
  }
  for (int i = s.size() - 1; i >= 0; --i, ++ans) {
    if (i == 0) continue;
    int j = pos[freq[i]];
    if (freq[i] == 0) {
      for (int i = 0; i < 26; ++i) j = min(j, get(1 << i));
    } else {
      for (int k = 0; k < 26; ++k) j = min(j, get(freq[i] ^ (1 << k)));
    }
    i = j + 1;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int ans;
  cin >> s;
  ans = solve();
  reverse(s.begin(), s.end());
  ans = min(ans, solve());
  cout << ans;
}
