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