#include <bits/stdc++.h>
using namespace std;
template <class T>
void chmin(T& a, T const& b) {
  if (b < a) a = b;
}
using ll = long long;
const ll mod = LLONG_MAX;
string s;
int imos[200010][30];
int ret;
int ans = 1;
int memo = -1;
vector<int> vec;
int main() {
  cin >> s;
  for (int i = 0; i < 26; i++) {
    char alpha = 'a';
    char temp = alpha + i;
    for (int j = 0; j < s.size(); j++) {
      if (j > 0) imos[j][i] += imos[j - 1][i];
      if (s[j] == temp) imos[j][i]++;
    }
  }
  while (1) {
    if (memo != -1) {
      ret = 0;
      for (int j = 0; j < 26; j++) {
        if ((imos[s.size() - 1][j] - imos[memo][j]) % 2 != 0) {
          vec.push_back(j);
          ret++;
        }
      }
      if (ret >= 2) {
        ans++;
      } else {
        goto E;
      }
      for (int i = memo + 1; i < s.size(); i++) {
        for (int j = 0; j < vec.size(); j++) {
          char temp = vec[j] + 'a';
          if (s[i] == temp) {
            memo = i;
            goto F2;
          }
        }
      }
    F2:;
    } else {
      ret = 0;
      for (int j = 0; j < 26; j++) {
        if ((imos[s.size() - 1][j]) % 2 != 0) {
          vec.push_back(j);
          ret++;
        }
      }
      if (ret >= 2) {
        ans++;
      } else {
        goto E;
      }
      for (int i = 0; i < s.size(); i++) {
        for (int j = 0; j < vec.size(); j++) {
          char temp = vec[j] + 'a';
          if (s[i] == temp) {
            memo = i;
            goto F;
          }
        }
      }
    F:;
      cerr << "memo"
           << "=" << memo << endl;
    }
  }
E:;
  cout << ans << endl;
}
