#include <iostream>
#include <string>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <vector>
#include <bitset>
#include <functional>
#include <queue>
#include <utility>

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define dump(x)  cerr << #x << " = " << (x) << endl;
typedef long long LL;

using namespace std;

int main(void)
{
	string S;

	cin >> S;

	/*
	int count = 0;
	bool flag = false;
	while(1){
		flag = false;
		for (int i = 0; i < S.size() - 1; i++) {
			if (S[i] != S[i + 1]) {
				S.erase(i, i + 1);
				i--;
				count += 2;
				flag = true;
				continue;
			}
		}
		if (flag == false) {
			break;
		}
	}

	cout << count << endl;
	*/

	unsigned int count = 0;
	FOR(i, 0, S.size()) {
		if (S[i] == '0') {
			count++;
		}
	}

	cout << min(count, S.size() - count) * 2 << endl;

	return 0;
}