#include <bits/stdc++.h>
using namespace std;
const int sigma = 30;
int Get(string s) {
  int ans = 0, u = 0;
  while (u < (int)s.size()) {
    int best = u, oddCount = 0;
    vector<int> cnt(sigma, 0);
    for (int i = u; i < (int)s.size(); i++) {
      if (cnt[s[i] - 'a'] % 2 == 1) {
        cnt[s[i] - 'a'] = 0;
        oddCount--;
      } else {
        cnt[s[i] - 'a'] = 1;
        oddCount++;
      }
      if (oddCount < 2) {
        best = i;
      }
    }
    ans++;
    u = best + 1;
  }
  return ans;
}
int main() {
  string s;
  cin >> s;
  int ans = Get(s);
  reverse(s.begin(), s.end());
  ans = min(ans, Get(s));
  cout << ans;
  return 0;
}
