#include <bits/stdc++.h>
using namespace std;
double PI = 3.1415926535897932;
long mod = 1000000007;
int main() {
  string s;
  cin >> s;
  int sum = 0;
  bool flag = 1;
  while (flag) {
    int n = s.size();
    flag = 0;
    for (int i = 0; i < n - 1; i++) {
      if (s[i] == '0' & s[i + 1] == '1') {
        s.erase(i, 2);
        sum += 2;
        flag = 1;
      } else if (s[i] == '1' & s[i + 1] == '0') {
        s.erase(i, 2);
        sum += 2;
        flag = 1;
      }
    }
  }
  cout << sum << endl;
}
