#include <bits/stdc++.h>
using namespace std;
struct Block {
  int cnts[26];
  Block() {
    for (int i = 0; i < 26; i++) {
      cnts[i] = 0;
    }
  }
  Block merge(const Block& other) {
    Block new_blk(*this);
    for (int i = 0; i < 26; i++) {
      new_blk.cnts[i] += other.cnts[i];
    }
    return new_blk;
  }
  bool is_valid() {
    bool has_one = false;
    for (int i = 0; i < 26; i++) {
      if (cnts[i] % 2 == 0)
        ;
      else {
        if (has_one) {
          return false;
        }
        has_one = true;
      }
    }
    return true;
  }
};
string s;
vector<char> sc;
template <class L, class T>
int merge_blocks(L& container, T itr_begin, T itr_end) {
  int merge_cnt = 0;
  auto itr = itr_begin;
  T prev_itr = itr;
  itr++;
  for (; itr != itr_end; itr++) {
    Block new_blk = itr->merge(*prev_itr);
    if (new_blk.is_valid()) {
      *itr = new_blk;
      container.erase(prev_itr);
      merge_cnt++;
    }
    prev_itr = itr;
  }
  return merge_cnt;
}
int main() {
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    sc.push_back(s[i]);
  }
  sort(sc.begin(), sc.end());
  list<Block> blocks;
  for (int i = 0; i < sc.size(); i++) {
    Block blk;
    blk.cnts[sc[i] - 'a']++;
    blocks.push_back(blk);
  }
  while (merge_blocks(blocks, blocks.begin(), blocks.end()))
    ;
  blocks.reverse();
  while (merge_blocks(blocks, blocks.begin(), blocks.end()))
    ;
  cout << blocks.size() << endl;
  return 0;
}
