#include <bits/stdc++.h>
using namespace std;
int main(int argc, char **argv) {
  int count = 0;
  string s;
  cin >> s;
  int i = 0;
  while (true) {
    if ((int)s.find("01") == -1 && (int)s.find("10") == -1) {
      break;
    }
    if ((int)s.find("01") != -1) {
      s.erase(s.begin() + (int)s.find("01"));
      count += 2;
    } else if ((int)s.find("10") != -1) {
      s.erase(s.begin() + (int)s.find("10"));
      count += 2;
    }
  }
  cout << count << endl;
  return 0;
}
