#include <bits/stdc++.h>
using namespace std;
string S;
int num[200010];
int main() {
  cin >> S;
  int N = S.size();
  int cnt[26];
  fill(cnt, cnt + 26, 0);
  for (auto x : S) {
    cnt[x - 'a']++;
  }
  int ans = 0;
  for (auto i = 0; i < 26; ++i) {
    if (cnt[i] % 2 == 1) {
      ans++;
    }
  }
  for (auto i = 0; i < 26; ++i) {
    char c = (char)('a' + i);
    int l = 0;
    for (auto j = 0; j < N; ++j) {
      if (S[j] == c) {
        num[j] = l;
        l++;
      }
    }
  }
  bool has_edge = false;
  if (cnt[S[0] - 'a'] % 2 == 1) {
    has_edge = true;
  }
  if (cnt[S[N - 1] - 'a'] % 2 == 1) {
    has_edge = true;
  }
  for (auto i = 0; i < N - 1; ++i) {
    if (S[i] != S[i + 1] && num[i] % 2 == 0 && num[i + 1] % 2 == 0 &&
        cnt[S[i] - 'a'] % 2 == 1 && cnt[S[i + 1] - 'a'] % 2 == 1) {
      has_edge = true;
      break;
    }
  }
  if (has_edge) {
    cout << ans << endl;
  } else {
    cout << ans + 1 << endl;
  }
}
