#include<bits/stdc++.h>
#include<algorithm>
using namespace std;

int main(){
  int ans;
  int A=0;
  int B=0;
  string s;
  cin >> s;
  for(int i=0; i<s.size(); ++i){
    if(s.at[i]=='0') A+=1;
    if(s.at[i]=='1') B+=1;
  }
  ans=min(A,B)*2;
  cout<<ans<<endl;
}
