#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  int ans = 0;
  int num0 = 0;
  int num1 = 1;
  for (int i = 0; i < str.length(); i++) {
    if (str[i] == '0') {
      num0++;
    } else if (str[i] == '1') {
      num1++;
    }
  }
  ans = 2 * min(num0, num1);
  cout << ans << endl;
  return 0;
}
