#include<iostream>
#include<string>
using namespace std;
int main(){
  string s;
  cin>>s;
  int count1=0,count0=0;
  for(int i=0;i<s.length();i++){
    if(s[i]=='0')
      coun0t++;
    if(s[i]=='1')
      count1++;
  }
  int ans=count1<count0? count1:count0;
  cout<<ans*2<<endl;
  return 0;
}