#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
signed main() {
  string S;
  cin >> S;
  long long c0, c1;
  c0 = c1 = 0;
  for (long long i = 0; i < S.length(); i++) {
    if (S[i] == '0') {
      c0++;
    }
  }
  for (long long i = 0; i < S.length(); i++) {
    if (S[S.length() - 1] == '1') {
      c1++;
    }
  }
  cout << min(c0, c1) * 2 << endl;
}
