#include <bits/stdc++.h>
using namespace std;
string s;
vector<vector<int> > num(26);
int N;
bool isOK(vector<int> j) {
  bool isThereOdd = false;
  for (int i = 0; i < 26; ++i) {
    if (j[i] % 2 == 1) {
      if (isThereOdd) {
        return false;
      }
      isThereOdd = true;
    }
  }
  return true;
}
long long dfs(int current_index, int ok_index, long long ans) {
  if (ok_index >= (N - 1)) {
    return ans;
  }
  if (current_index >= N) {
    return INT_MAX;
  }
  long long this_ans = INT_MAX;
  vector<int> judge(26, 0);
  for (int i = 0; i < 26; i++) {
    judge[i] = num[i][current_index];
  }
  if (ok_index != -1) {
    for (int i = 0; i < 26; i++) {
      judge[i] -= num[i][ok_index];
    }
  }
  if (isOK(judge)) {
    this_ans = min(this_ans, dfs(current_index + 1, current_index, ans + 1));
  }
  this_ans = min(this_ans, dfs(current_index + 1, ok_index, ans));
  return this_ans;
}
int main() {
  cin >> s;
  N = s.size();
  for (int i = 0; i < 26; ++i) {
    num[i] = vector<int>(s.size(), 0);
  }
  num[s[0] - 'a'][0] = 1;
  for (int i = 1; i < s.size(); ++i) {
    for (int j = 0; j < 26; ++j) {
      if (j == s[i] - 'a') {
        num[j][i] = num[j][i - 1] + 1;
      } else {
        num[j][i] = num[j][i - 1];
      }
    }
  }
  cout << dfs(0, -1, 0) << endl;
}
