#include <bits/stdc++.h>
int main(void) {
  int i = 0, count[2], ans;
  char r[256];
  scanf("%s", r);
  for (i = 0; i < 6; i++) {
    if (r[i] == '0') count[0]++;
    if (r[i] == '1') count[1]++;
  }
  if (count[0] > count[1])
    ans = count[1];
  else
    ans = count[0];
  printf("%d", ans * 2);
  return 0;
}
