#include <bits/stdc++.h>
using namespace std;
string s, t;
long long int n, cnt[26], c[26][200020], last[26], ans, ans2,
    pre = 0, cnt2[26], c2[26][200020], last2[26];
int main() {
  ios::sync_with_stdio(false);
  cin >> s;
  n = s.size();
  for (int i = 0; i < n; i++) {
    cnt[s[i] - 'a']++;
    last[s[i] - 'a'] = i;
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < 26; j++)
      if (i == 0) {
        if (j == s[i] - 'a') c[j][i] = 1;
      } else {
        if (j == s[i] - 'a')
          c[j][i] = c[j][i - 1] + 1;
        else
          c[j][i] = c[j][i - 1];
      }
  for (int i = 0; i < n; i++) {
    if (pre == 0) {
      if (c[s[i] - 'a'][i] % 2 == 1 and last[s[i] - 'a'] == i) ans++, pre = i;
    } else {
      if ((c[s[i] - 'a'][i] - c[s[i] - 'a'][pre - 1]) % 2 == 1 and
          last[s[i] - 'a'] == i)
        ans++, pre = i;
    }
  }
  for (int i = s.size() - 1; i >= 0; i--) t += s[i];
  s = t;
  pre = 0;
  for (int i = 0; i < n; i++) {
    cnt2[s[i] - 'a']++;
    last2[s[i] - 'a'] = i;
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < 26; j++)
      if (i == 0) {
        if (j == s[i] - 'a') c2[j][i] = 1;
      } else {
        if (j == s[i] - 'a')
          c2[j][i] = c2[j][i - 1] + 1;
        else
          c2[j][i] = c2[j][i - 1];
      }
  for (int i = 0; i < n; i++) {
    if (pre == 0) {
      if (c2[s[i] - 'a'][i] % 2 == 1 and last2[s[i] - 'a'] == i)
        ans2++, pre = i;
    } else {
      if ((c2[s[i] - 'a'][i] - c2[s[i] - 'a'][pre - 1]) % 2 == 1 and
          last2[s[i] - 'a'] == i)
        ans2++, pre = i;
    }
  }
  cout << max(1ll, min(ans2, ans)) << endl;
  return 0;
}
