#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "sz:" << v.size() << "\n[";
  for (const auto& p : v) {
    os << p << ",";
  }
  os << "]\n";
  return os;
}
template <typename S, typename T>
ostream& operator<<(ostream& os, const pair<S, T>& p) {
  os << "(" << p.first << "," << p.second << ")";
  return os;
}
constexpr ll MOD = (ll)1e9 + 7LL;
template <typename T>
constexpr T INF = numeric_limits<T>::max() / 100;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  const int N = s.size();
  vector<vector<int>> imos(26, vector<int>(N, 0));
  for (int i = 0; i < N; i++) {
    imos[s[i] - 'a'][i]++;
    imos[s[i] - 'a'][i] %= 2;
  }
  for (int i = 0; i < 26; i++) {
    for (int j = 1; j < N; j++) {
      imos[i][j] += imos[i][j - 1];
      imos[i][j] %= 2;
    }
  }
  int sum = 0;
  for (int i = 0; i < 26; i++) {
    sum += imos[i][N - 1];
  }
  if (sum <= 1) {
    cout << 1 << endl;
    return 0;
  }
  vector<ll> value(N);
  for (int i = 0; i < N; i++) {
    ll sum = 0;
    for (int j = 0; j < 26; j++) {
      sum += (ll)(imos[j][i]) << j;
    }
    value[i] = sum;
  }
  const ll maximum = 1LL << 26;
  vector<ll> minimum(maximum, INF<ll>);
  minimum[0] = 0;
  for (int i = 0; i < N; i++) {
    const ll v = value[i];
    ll u = v;
    ll mini = minimum[v];
    for (int d = 0; d < 26; d++) {
      if ((v >> d) & 1) {
        u = v - (1LL << d);
      } else {
        u = v + (1LL << d);
      }
      mini = min(mini, minimum[u] + 1);
    }
    minimum[v] = min(minimum[v], mini);
  }
  cout << minimum[value[N - 1]] << endl;
  return 0;
}
