#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const double EPS = 1e-10;
const int INF = 2147483647;
string s;
int n;
int con[26];
bool isPal(void) {
  int t = 0;
  for (int i = 0; i < 26; i++) {
    if (con[i] % 2) t++;
  }
  if (t < 2)
    return true;
  else
    return false;
}
int solve(string s) {
  if (s.size() == 0) return 0;
  if (s.size() == 1) return 1;
  memset(con, 0, sizeof con);
  for (int i = 0; i < s.size(); i++) {
    int t = s[i] - 'a';
    con[t]++;
  }
  if (isPal())
    return 1;
  else {
    int i = s.size() - 1;
    while (!isPal()) {
      int t = s[i] - 'a';
      con[t]--;
      i--;
    }
    return 1 + solve(s.substr(i + 1, s.size() - i));
  }
}
int main() {
  cin >> s;
  n = s.size();
  cout << solve(s) << endl;
  return 0;
}
