#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int a = 0, b = 0;
  for (int i = 1; i < s.length(); i++) {
    if (s[i] == '0') a++;
    if (s[i] == '1') b++;
  }
  if (a > b) a = b;
  cout << a * 2 << endl;
}
