#include <bits/stdc++.h>
using namespace std;
int INF = 100000000;
int N = 0;
vector<int> dp;
void flush(int p, int m) {
  for (int i = p; i < N; i++) {
    dp[i] = min(dp[i], m);
  }
}
int recursive(string s, int n) {
  if (n >= dp[s.length()]) return INF;
  int a[26];
  int ev = 0;
  for (int i = 0; i < 26; i++) a[i] = 0;
  for (int i = 0; i < s.length(); i++) {
    a[s[i] - 0x61]++;
  }
  for (int i = 0; i < 26; i++) {
    ev += a[i] & 1;
  }
  if (ev <= 1) {
    flush(s.length(), n + 1);
    return 1;
  }
  int m = INF;
  for (int i = s.length() - 1; i > 0; i--) {
    int k = --a[s[i] - 0x61];
    if (k % 2 == 0)
      ev--;
    else
      ev++;
    if (ev <= 1) {
      m = min(m, recursive(s.substr(i), n + 1));
    }
  }
  flush(s.length(), n + m + 1);
  return 1 + m;
}
int main() {
  string s;
  cin >> s;
  N = s.length();
  dp = vector<int>(N + 1);
  for (int i = 0; i < N + 1; i++) {
    dp[i] = INF;
  }
  cout << recursive(s, 0) << endl;
}
