#include <bits/stdc++.h>
using namespace std;
const int N = 222222;
int r[N], l[N];
int main() {
  string s;
  cin >> s;
  int al[27];
  for (int i = 0; i < int(s.size()); i++) {
    al[s[i] - 'a']++;
    int sum = 0;
    for (int j = 0; j < int(27); j++) sum += al[j] % 2;
    r[i] = sum;
  }
  for (int i = 0; i < int(27); i++) al[i] = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    al[s[i] - 'a']++;
    int sum = 0;
    for (int j = 0; j < int(27); j++) sum += al[j] % 2;
    l[i] = sum;
  }
  int ans = min(r[s.size() - 1], l[0]);
  for (int i = 1; i < int(s.size()); i++) {
    ans = min(ans, r[i] + l[i + 1]);
  }
  printf("%d\n", max(1, ans));
}
