#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	string s;
  	cin >> s;
  	int ones = 0;
  	ones = count(s.begin(),s.end(),'1');
  	cout << min(2*ones, 2*(s.size()-ones))<<'\n';

	return 0;
}