#include <bits/stdc++.h>
using namespace std;
template <typename T>
void dbg(T t) {
  cerr << t << endl;
}
template <typename T, typename... Args>
void dbg(T t, Args... args) {
  cerr << t << " ";
  dbg(args...);
}
string s;
int dp[200005];
int solv(int id = 0) {
  if (id >= s.size()) return 0;
  if (dp[id] != 400000) return dp[id];
  int freq[26];
  memset(freq, 0, sizeof(freq));
  int even = 26;
  for (int i = id; i < s.size(); i++) {
    freq[s[i] - 'a']++;
    (freq[s[i] - 'a'] & 1) ? even-- : even++;
    if (even > 24) {
      dp[id] = min(dp[id], 1 + solv(i + 1));
    }
  }
  return dp[id];
}
int main() {
  cin >> s;
  for (int i = 0; i <= s.size(); i++) dp[i] = 400000;
  cout << solv() << endl;
  return 0;
}
