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

string s;
int cnt[2] = {0};

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