#include <bits/stdc++.h>
using namespace std;
long long N, M, k, a, b, c, d, e, H, W, X;
long long A[200001] = {};
long long B[200002] = {};
long long tt[20000] = {};
bool f;
bool ff;
string S, SS;
set<long long> sll;
pair<long long, long long> buf;
vector<long long> vpl;
int main() {
  cin >> S;
  d = 0;
  a = 0;
  b = 0;
  for (long i = 0; i < S.size(); i++) {
    if (S[i] == '1') {
      a++;
    } else {
      b++;
    }
  }
  cout << (max(a, b)) * 2 << endl;
  return 0;
}
