#include <bits/stdc++.h>
using namespace std;

int main() {
	string s;
	cin >> s;
	vector<int> a(2);
	for (int i = 0; i < (int) s.size(); i++) {
		a[s[i] - 48]++;
	}
	cout << min(a[0], a[1]) * 2 << endl;
}
