#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s;
	cin>>s;
	int zc = 0,oc = 0;
	for(int i=0;i<s.size();i++)
	{
		if(s[i] == '0')zc++;
		if(s[i] == '1')oc++;
	 } 
	int k = min(zc,oc);
	cout<<k*2<<endl;
 } 