#include<iostream>
#include<string>
using namespace std;

int main(){
  string S;
  cin >> S;
  
  int N = S.length();
  int k = 0;
  int t = 0;
  
  int l = 0;
  
  while(k < N){
    if((S[k] == '0' && S[k+1] == '1')||(S[k] == '1' && S[k+1] == '0')){
      S.erase(k, 2);
      l += 2;
      k -= 1;
    }
    else{
      k += 1;
    }
  }
  
  cout << l << endl;