#include<iostream>
#include<string>
#include<algorithm>
#define int long long;
using namespace std;

signed main() {
	string S;
	cin >> S;
	int A1 = 0;
	int A2 = 0;
	for(int i = 0;i < S.size();i++) {
		if(S.at(i) == '0') {
			A1++;
		}
		if(S.at(i) == '1') {
			A2++;
		}
	}
	cout << min(A1,A2) * 2 << endl;
}