#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  long long max = 0;
  long long ans = 0;
  while (max != s.length()) {
    int alp[26] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
    int kisu = 0;
    for (long long i = max; i < s.length(); i++) {
      int moji;
      if (s.substr(i, 1) == "a") {
        moji = 0;
      }
      if (s.substr(i, 1) == "b") {
        moji = 1;
      }
      if (s.substr(i, 1) == "c") {
        moji = 2;
      }
      if (s.substr(i, 1) == "d") {
        moji = 3;
      }
      if (s.substr(i, 1) == "e") {
        moji = 4;
      }
      if (s.substr(i, 1) == "f") {
        moji = 5;
      }
      if (s.substr(i, 1) == "g") {
        moji = 6;
      }
      if (s.substr(i, 1) == "h") {
        moji = 7;
      }
      if (s.substr(i, 1) == "i") {
        moji = 8;
      }
      if (s.substr(i, 1) == "j") {
        moji = 9;
      }
      if (s.substr(i, 1) == "k") {
        moji = 10;
      }
      if (s.substr(i, 1) == "l") {
        moji = 11;
      }
      if (s.substr(i, 1) == "m") {
        moji = 12;
      }
      if (s.substr(i, 1) == "n") {
        moji = 13;
      }
      if (s.substr(i, 1) == "o") {
        moji = 14;
      }
      if (s.substr(i, 1) == "p") {
        moji = 15;
      }
      if (s.substr(i, 1) == "q") {
        moji = 16;
      }
      if (s.substr(i, 1) == "r") {
        moji = 17;
      }
      if (s.substr(i, 1) == "s") {
        moji = 18;
      }
      if (s.substr(i, 1) == "t") {
        moji = 19;
      }
      if (s.substr(i, 1) == "u") {
        moji = 20;
      }
      if (s.substr(i, 1) == "v") {
        moji = 21;
      }
      if (s.substr(i, 1) == "w") {
        moji = 22;
      }
      if (s.substr(i, 1) == "x") {
        moji = 23;
      }
      if (s.substr(i, 1) == "y") {
        moji = 24;
      }
      if (s.substr(i, 1) == "z") {
        moji = 25;
      }
      alp[moji] += 1;
      if (alp[moji] % 2 == 1) {
        kisu++;
      } else {
        kisu--;
      }
      if (kisu <= 1) {
        max = i + 1;
      }
    }
    ans++;
  }
  cout << ans << endl;
  return 0;
}
