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

int main(){
   string s; cin >> s;
   int cntZero=0, cntOne=0;
   for(int i=0;i<s.size();i++){
      if(s[i]==‘0’) cntZero++;
      else cntOne++;
   }
   cout << 2* min(cntZero, cntOne) <<endl;
}