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

int main() {
queue<int> red;
queue<int> blue;
string s;
cin >> s;
for(int i=0;i<n;i++){
    if(s[i]=='0')red.push(s[i]);
    if(s[i]=='1')blue.push(s[i]);
}
cout << 2*min(red.size(),blue.size()) << endl;
}
