#include <bits/stdc++.h>
using namespace std;
int main() {
  int ans;
  int A = 0;
  int B = 0;
  char s[100001];
  for (int i = 1; i <= 100000; ++i) {
    cin >> s[i];
  }
  for (int i = 1; i <= 100000; ++i) {
    if (s[i] == '0') A += 1;
    if (s[i] == '1') B += 1;
  }
  ans = min(A, B);
  ans *= 2;
  cout << ans << endl;
}
