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