#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  int n = s.length();
  int hoge = 0;
  vector<int> cnt(26, 0);
  for (int i = 0; i < n; i++) {
    cnt[s[i] - 'a']++;
  }
  for (int i = 0; i < 26; i++) {
    hoge += (cnt[i] % 2);
  }
  vector<int> cnt2(26, 0), cnt3(26, 0);
  int foo = 0, ans = 1;
  bool flag = false;
  for (int i = 0; i < n; i++) {
    if (hoge <= 1) break;
    cnt2[s[i] - 'a']++;
    if (cnt3[s[i] - 'a'] % 2 == 1) {
      foo--;
    } else {
      foo++;
    }
    cnt3[s[i] - 'a']++;
    if (cnt3[s[i] - 'a'] % 2 == 1) {
      if (foo == 1) {
        foo = 0;
        hoge--;
        cnt3.assign(26, 0);
        flag = false;
        ans++;
        continue;
      }
    }
    if (cnt2[s[i] - 'a'] == cnt[s[i] - 'a'] && cnt3[s[i] - 'a'] % 2 == 1) {
      if (!flag) {
        flag = true;
      } else {
        ans += foo;
        hoge--;
        hoge += max(0, foo - 1);
        if (hoge > 1) {
          hoge--;
          ans++;
        }
        foo = 0;
        cnt3.assign(26, 0);
        flag = false;
      }
    }
  }
  cout << max(ans, 1) << endl;
  return 0;
}
