#include<bits/stdc++.h>
using namespace std;
#define ALL(v) (v).begin(),(v).end()
#define REP(i,p,n) for(int i=p;i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define SZ(x) ((int)(x).size())
#define debug(x) cerr << #x << ": " << x << '\n'
#define INF 999999999
typedef long long int Int;
typedef pair<int,int> P;
using ll = long long;
using VI = vector<int>;

int main(){
  string s;cin >> s;
  int iti = 0;
  int zero = 0;
  if(s.size()==1){cout << 0 << endl;return 0;}
  for(auto &i:s){
    if(s=='1') iti++;
    else zero++;
  }
  cout << min(iti,zero)*2 << endl;
  return 0;
}
