#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9, MOD = 1e9 + 7, around[] = {0, 1, 1, -1, 0, -1, 1, 0, 0};
const long double PI = abs(acos(-1));
string s;
int main() {
  cin >> s;
  int cou = 0, pos = 0;
  while (1) {
    int li[30] = {}, tmp;
    for (int i = (pos); i < (s.size()); i++) {
      li[s[i] - 'a']++;
      int c = 0;
      for (int i = (0); i < (30); i++)
        if (li[i] % 2) c++;
      if (c == 1 || c == 0) tmp = i + 1;
    }
    pos = tmp;
    cou++;
    if (pos >= s.size()) break;
  }
  int cou2 = 0;
  pos = s.size() - 1;
  while (1) {
    int li[30] = {}, tmp;
    for (int i = (pos); i >= (0); i--) {
      li[s[i] - 'a']++;
      int c = 0;
      for (int i = (0); i < (30); i++)
        if (li[i] % 2) c++;
      if (c == 1 || c == 0) tmp = i - 1;
    }
    pos = tmp;
    cou2++;
    if (pos < 0) break;
  }
  cout << min(cou, cou2) << endl;
  return 0;
}
