#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin >> s;
  int N = s.size();
  vector<vector<int>> cnt(26, vector<int>(N + 1));
  for (int i = 0; i < N; i++) cnt[s[i] - 'a'][i + 1]++;
  for (int c = 0; c < 26; c++) {
    for (int i = 0; i < N; i++) cnt[c][i + 1] += cnt[c][i];
  }
  set<pair<int, int>> dp;
  dp.insert({0, 0});
  for (int i = 0; i < N; i++) {
    int res;
    for (auto& p : dp) {
      int cost, j;
      tie(cost, j) = p;
      int odd = 0;
      for (int c = 0; c < 26; c++) {
        if ((cnt[c][i + 1] - cnt[c][j]) % 2 == 1) odd++;
      }
      if (odd <= 1) {
        res = cost + 1;
        break;
      }
    }
    dp.insert({res, i + 1});
  }
  for (auto& p : dp) {
    if (p.second == N) {
      cout << p.first << endl;
      break;
    }
  }
}
