#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 5;
int pre[26][MAX];
int dp[MAX];
string s;
int solve(int pos) {
  if (pos == s.length()) {
    return 0;
  }
  if (dp[pos] != -1) {
    return dp[pos];
  }
  int ans = s.length();
  for (int i = pos; i < s.length(); i++) {
    int cnt = 0;
    for (int j = 0; j < 26; j++) {
      if ((pre[j][i] - (pos == 0 ? 0 : pre[j][pos - 1])) % 2) {
        cnt++;
      }
    }
    if (cnt > 1) {
      continue;
    } else {
      ans = min(ans, 1 + solve(i + 1));
    }
  }
  dp[pos] = ans;
  return ans;
}
int main() {
  memset(dp, -1, sizeof dp);
  cin >> s;
  pre[s[0] - 'a'][0] = 1;
  for (int i = 1; i < s.length(); i++) {
    for (int j = 0; j < 26; j++) {
      if ((s[i] - 'a') == j) {
        pre[j][i] = pre[j][i - 1] + 1;
      } else {
        pre[j][i] = pre[j][i - 1];
      }
    }
  }
  printf("%d\n", solve(0));
  return 0;
}
