#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using P = pair<ll, ll>;
const ll INF = 5e15;
ll to_num(const array<ll, 26> &arr) {
  ll ret = 0;
  for (ll i = 0; i < 26; i++)
    if (arr[i] & 1) ret += (1 << i);
  return ret;
}
int main() {
  string s;
  cin >> s;
  map<ll, stack<ll>> ma;
  vector<ll> nodes = {0};
  vector<array<ll, 26>> sum(s.size());
  for (ll i = 0; i < 26; i++) sum[0][i] = (i == s[0] - 'a');
  for (ll i = 1; i < s.size(); i++) {
    for (ll j = 0; j < 26; j++) sum[i][j] = sum[i - 1][j];
    sum[i][s[i] - 'a']++;
  }
  for (ll i = 0; i < sum.size(); i++) {
    ll num = to_num(sum[i]);
    nodes.push_back(num);
    ma[num].push(i + 1);
  }
  vector<ll> d(nodes.size());
  queue<P> q;
  q.push(P(0, 0));
  while (q.size()) {
    P now = q.front();
    q.pop();
    for (ll j = -1; j < 26; j++) {
      ll tmp = nodes[now.first];
      if (j >= 0) tmp ^= (1 << j);
      stack<ll> &st = ma[tmp];
      while (st.size() && st.top() > now.first) {
        d[st.top()] = now.second + 1;
        q.push(P(st.top(), d[st.top()]));
        st.pop();
      }
    }
  }
  cout << d[nodes.size() - 1] << endl;
  return 0;
}
