#include <bits/stdc++.h>
using namespace std;
string S;
int main() {
  cin >> S;
  string target1 = "01";
  string target2 = "10";
  bool flag1 = true;
  bool flag2 = true;
  int cube = 0;
  while (flag1 || flag2) {
    if (S.find(target1) == string::npos) {
      flag1 = false;
    } else {
      flag1 = true;
      S.replace(S.find(target1), target1.length(), "");
      cube += 2;
    }
    if (S.find(target2) == string::npos) {
      flag2 = false;
    } else {
      flag2 = true;
      S.replace(S.find(target2), target2.length(), "");
      cube += 2;
    }
  }
  cout << cube << endl;
}
