#include <bits/stdc++.h>
using namespace std;
string s;
long long dp[1 << 20];
long long n;
long long solve(long long index) {
  if (index == n) {
    return 0;
  }
  if (dp[index] != -1) {
    return dp[index];
  }
  long long hash1[26];
  memset(hash1, 0, sizeof hash1);
  long long ans = 10000000000000ll;
  for (long long i = index; i < n; i++) {
    hash1[s[i] - 'a']++;
    long long cnt = 0;
    for (long long j = 0; j < 26; j++) {
      if (hash1[j] % 2) {
        cnt++;
      }
    }
    if (cnt <= 1) {
      ans = min(ans, 1 + solve(i + 1));
    }
  }
  return dp[index] = ans;
}
int main() {
  cin >> s;
  n = s.size();
  memset(dp, -1, sizeof dp);
  cout << solve(0);
}
