#include <bits/stdc++.h>
using namespace std;
int inf = 1000001000;
long long INF = 100000000000000000;
long long MOD = 1000000007;
int main() {
  string s;
  cin >> s;
  int k1 = 0, k2 = 0;
  for (int(i) = 0; (i) < (s.size()); (i)++) {
    if (s[i] == 0)
      k1++;
    else
      k2++;
  }
  int ans = min(k1, k2);
  cout << 2 * ans << endl;
}
