#include <bits/stdc++.h>
using namespace std;
string s;
char str[100001];
int sum = 0;
int main() {
  scanf("%s", str);
  s = str;
  for (string::iterator it = begin(s); it != end(s) && !s.empty();) {
    if (*it == '1' && *(it + 1) == '0') {
      s.erase(it, it + 2);
      sum++;
      it = begin(s);
    } else if (*it == '0' && *(it + 1) == '1') {
      s.erase(it, it + 2);
      sum++;
      it = begin(s);
    } else
      it++;
  }
  printf("%d", 2 * sum);
}
