#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const double EPS = 1e-10;
const int _N = 2e5;
int n, m;
struct BIT {
  int data[_N + 1];
  void init() {
    for (int i = (0); i < (n + 1); ++i) data[i] = 0;
  }
  void add(int i, int x) {
    i++;
    while (i <= n) {
      data[i] += x;
      i += i & -i;
    }
  }
  int sum(int i) {
    i++;
    int s = 0;
    while (i >= 1) {
      s += data[i];
      i -= i & -i;
    }
    return s;
  }
  int range(int a, int b) {
    int s = sum(b);
    if (a > 0) s -= sum(a - 1);
    return s;
  }
};
BIT letters[26];
bool isOk(int last, int x) {
  int odds = 0;
  for (int i = (0); i < (26); ++i) {
    if (letters[i].range(last, x) % 2 == 1) odds++;
  }
  return odds <= 1;
}
int main() {
  string s;
  cin >> s;
  n = s.size();
  for (int i = (0); i < (26); ++i) letters[i].init();
  for (int i = (0); i < (n); ++i) {
    letters[s[i] - 'a'].add(i, 1);
  }
  int last = 0, ans = 0;
  while (last < (int)s.size()) {
    int now = s.size() - 1;
    while (!isOk(last, now)) now--;
    ans++;
    last = now + 1;
  }
  cout << ans << endl;
}
