#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[305], s2[305];
  scanf("%s", &s);
  int t = 0;
  for (int i = 0; i < strlen(s); i++) {
    bool add = 0;
    for (int j = 0; j < t; j++)
      if (s[i] != s2[j]) {
        s2[j] = s[i];
        add = 1;
        break;
      }
    if (!add) s2[t++] = s[i];
  }
  printf("%d\n", t);
}
