#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int sum = 0;
  for (int z = 1; z <= 10000; z++) {
    for (int i = 0; i < s.length(); i++) {
      if (s[i] == '0' && s[i + 1] == '1' || s[i] == '1' && s[i + 1] == '0') {
        for (int j = i; j < s.length(); j++) {
          s[j] = s[j + 2];
        }
        sum += 2;
      }
    }
  }
  cout << sum << endl;
  return 0;
}
