#include <bits/stdc++.h>
using namespace std;
int sumdigit(int x) {
  int sum = 0;
  while (x != 0) {
    sum += x % 10;
    x /= 10;
  }
  return sum;
}
int gcd(int x, int y) {
  if (x < y) {
    int temp = x;
    x = y;
    y = temp;
  }
  int r = x % y;
  while (r != 0) {
    x = y;
    y = r;
    r = x % y;
  }
  return y;
}
int main() {
  string S;
  cin >> S;
  int ans = 0;
  while (1) {
    string tmp = S;
    for (int i = 0; i < S.size(); i++) {
      if (S[i] == '0') {
        if (S[i + 1] == '1') {
          ans += 2;
          S.erase(S.begin() + i);
          S.erase(S.begin() + i);
        }
      }
      if (S[i] == '1') {
        if (S[i + 1] == '0') {
          ans += 2;
          S.erase(S.begin() + i);
          S.erase(S.begin() + i);
        }
      }
    }
    if (tmp == S) {
      cout << ans << endl;
      return 0;
    }
  }
}
