#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string s;
  cin >> s;
  int num[26] = {0};
  int ch[26] = {0};
  for (int i = 0; i < s.length(); i++) {
    num[s[i] - 'a']++;
  }
  int ki = 0;
  int gu = 0;
  int in = 0;
  for (int i = 0; i < 26; i++) {
    if (num[i] % 2 == 0)
      gu += num[i] / 2;
    else {
      gu += num[i] / 2;
      ki++;
      ch[in++] = i;
    }
  }
  int ans = 1;
  int head = 0;
  int tail = s.length() - 1;
  if (ki == 0 || ki == 1) {
    cout << 1 << endl;
  } else {
    while (1) {
      for (int i = 0; i < in; i++) {
        if (s[head] - 'a' == ch[i]) {
          ans++;
          ki--;
          break;
        }
      }
      if (ki == 1) {
        cout << ans << endl;
        return 0;
      }
      for (int i = 0; i < in; i++) {
        if (s[tail] - 'a' == ch[i]) {
          ans++;
          break;
        }
      }
      if (ki == 1) {
        cout << ans << endl;
        return 0;
      }
      head++;
      tail--;
      if (head > tail) {
        cout << ans - 1 << endl;
        return 0;
      }
    }
  }
  return 0;
}
