#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int k = 0, count0 = 0, count1 = 0;
  for (int i = 0; i < S.size(); i++) {
    if (k == 0) {
      if (S.at(i) == '0') {
        k++;
        count0++;
      }
    } else {
      if (S.at(i) == '0')
        count0++;
      else
        count1++;
    }
  }
  cout << min(count0, count1) * 2 << endl;
}
