#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long a, b, c, d, m, n, maxi = 0, f = 0, mini = 1001001001, sum = 0;
  string str;
  cin >> str;
  for (long long i = (long long)(0); i < (long long)(n); i++) {
    if (str[i] == 0)
      f++;
    else
      sum++;
  }
  maxi = min(sum, f);
  cout << maxi * 2 << endl;
  return 0;
}
