#include <bits/stdc++.h>
int cnt = 1;
void confirmPalindrome(std::string str) {
  std::string tmp = str;
  std::sort(tmp.begin(), tmp.end());
  std::map<char, int> elemMap;
  for (auto itr = tmp.begin(); itr != tmp.end(); itr++) {
    elemMap[*itr]++;
  }
  int oddCnt = 0;
  char partition = str[0];
  for (auto itr = elemMap.begin(); itr != elemMap.end(); itr++) {
    if (itr->second % 2 != 0) {
      oddCnt++;
      partition = itr->first;
    }
  }
  if (str.size() % 2 == 0) {
    if (oddCnt == 0) return;
  } else {
    if (oddCnt == 1) return;
  }
  cnt++;
  int partition_elem = (int)str.find(partition);
  confirmPalindrome(str.substr(0, partition_elem));
  confirmPalindrome(str.substr(partition_elem));
}
int main(void) {
  std::string s;
  std::cin >> s;
  confirmPalindrome(s);
  std::cout << cnt << std::endl;
  return 0;
}
