#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin>>s;
  int aka=count(begin(s),end(s),'0');
  int ao=count(begin(s),end(s),'1');
  int kotae=aka+ao-abs(aka-ao);
  cout<<kotae<<endl;
  return 0;
}