#include<iostream>
#include<string>
using namespace std;
int main(){
	string s;
	cin >> s;
	int accum = 0;
	for(int i=0; i<s.length(); ++i) accum += (s[i]=='1')? 1:-1;
	cout << s.length()-abs(accum) <<endl;
}
