#include <bits/stdc++.h>
#define inf 1000000000
#define maxs(x,y) (x = max(x , y))
#define mins(x,y) (x = min(x , y))
using namespace std;
typedef long long int ll;

int main(){
  string s;
  cin  >> s;
  int n,i,ans,a=0,b=0;
  n = s.length()

  for(i=0 ; i<n ; i++){
    if(s[i] == '0'){
      a++;
    }else{
      b++;
    }
  }

  ans = min(a,b)*2

  cout << ans << endl;

}
