#include <bits/stdc++.h>
int main(void) {
  int flag = 1, j = 0, k = 0, siten = -1, ans = 0;
  char s[100002];
  if (scanf("%s", s) == 1)
    ;
  for (int i = 0; i < strlen(s) / 2 + 1; i++) {
    k = i + 1;
    for (int j = 0; j < strlen(s); j++) {
      if (j == strlen(s)) {
        break;
      }
      while (s[j] == 'a') {
        j++;
      }
      k = j + 1;
      while (s[k] == 'a') {
        k++;
      }
      if ((s[j] == '0' && s[k] == '1') || (s[j] == '1' && s[k] == '0')) {
        s[j] = 'a';
        s[k] = 'a';
        ans += 2;
      }
    }
  }
  printf("%d", ans);
  return 0;
}
