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