#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef  long long ll;
int main(void){
    string S;
    cin >> S;
    ll cnt[2]={};
    rep(i,S.length()){
        cnt[S[i]%2]++;
    }
    cout << min(cnt[1],cnt[0])*2 << endl;

