#include <bits/stdc++.h>
using namespace std;
const long long nmax = 1e9 + 7;
const long long mod = 998244353;
const double PI = 2 * asin(1);
int main() {
  string S;
  cin >> S;
  int cnt_0 = 0;
  int cnt_1 = 0;
  int N = S.size();
  for (int i = 0; i < N; i++) {
    if (S.at(i) == '0') {
      cnt_0++;
    } else {
      cnt_1++;
    };
  };
  int ans = min(min(cnt_0, cnt_1) * 2, N);
  cout << ans << endl;
  return 0;
}
