#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, m, k, x, y, res = 0, l, cnt0 = 0, sum = 0, z, sum1 = 0, cnt1 = 0,
                           h, res1, cnt2 = 0;
  string s1;
  cin >> s1;
  n = (long long)s1.size();
  for (long long i = 0; i < n; i++) {
    if (s1[i] == '0') cnt0++;
    if (s1[i] == '1') cnt1++;
    if (s1[i] == '1' && cnt0 > 0) {
      sum += 2;
      cnt0--;
    }
    if (s1[i] == '0' && cnt1 > 0) {
      sum1 += 2;
      cnt1--;
    }
  }
  cout << max(sum, sum1);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  t = 1;
  while (t--) solve();
}
