#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int ans = 0;
  long long int ksk;
  char s[100001];
  for (long long int i = 0; i < 100001; i++) {
    cin >> s[i];
  }
  long long int a = 0;
  long long int b = 0;
  for (long long int i = 0; i < 100001; i++) {
    if (s[i] != '0' && s[i] != '1') break;
    if (s[i] == '0') a++;
    if (s[i] == '1') b++;
  }
  ans = min(a, b) * 2;
  cout << ans << endl;
  return 0;
}
