#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  string s;
  cin >> s;
  int ans = 0;
  for (int start = 0; start != s.size();) {
    map<char, int> mp;
    for (int i = start; i < s.size(); ++i) {
      auto itr = mp.find(s[i]);
      if (itr != mp.end()) {
        mp[s[i]]++;
      } else {
        mp[s[i]] = 1;
      }
    }
    for (int end = s.size() - 1; end >= start; --end) {
      int kisuu = 0;
      for (auto itr = mp.begin(); itr != mp.end(); itr++) {
        if (itr->second % 2 == 1) {
          ++kisuu;
        }
      }
      if (kisuu <= 1) {
        ans += 1;
        start = end + 1;
        break;
      }
      mp[s[end - 1]]--;
    }
  }
  cout << ans << endl;
  return 0;
}
