#include <bits/stdc++.h>
using namespace std;
int cnt[100], cnt2[100];
string s;
int imos[26][201010];
int sum[200000];
int res[26];
int main() {
  cin >> s;
  int n = s.size();
  for (long long i = (long long)(0); i < (long long)(n); i++) {
    cnt[s[i] - 'a']++;
  }
  int tmp = 0;
  int resa = 0;
  for (long long i = (long long)(0); i < (long long)(26); i++) {
    if (cnt[i] % 2 == 1) tmp++;
  }
  if (tmp == 0)
    cout << 1 << endl;
  else {
    for (long long i = (long long)(0); i < (long long)(26); i++) {
      if (cnt[i] % 2 == 0) {
        for (long long j = (long long)(0); j < (long long)(n); j++)
          if (s[j] - 'a' == i) imos[i][j]++;
        for (long long j = (long long)(0); j < (long long)(n); j++) {
          imos[i][j + 1] += imos[i][j];
          imos[i][j + 1] %= 2;
        }
      }
    }
    for (long long i = (long long)(0); i < (long long)(n); i++) {
      for (long long j = (long long)(0); j < (long long)(26); j++)
        sum[i] += imos[j][i];
    }
    for (long long i = (long long)(0); i < (long long)(26); i++)
      res[i] = INT_MAX / 3;
    for (long long i = (long long)(0); i < (long long)(n); i++) {
      if (cnt[s[i] - 'a'] % 2 == 1) {
        res[s[i] - 'a'] =
            (res[s[i] - 'a'] < sum[i] + 1 ? res[s[i] - 'a'] : sum[i] + 1);
      }
    }
    for (long long i = (long long)(0); i < (long long)(26); i++)
      if (cnt[i] % 2 == 1) resa += res[i];
    cout << resa << endl;
  }
  return 0;
}
