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