#include <bits/stdc++.h>
using namespace std;
ifstream f("input.in");
ofstream g("output.out");
int main(int argc, char **argv) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int a, b, c;
  string str;
  getline(cin, str);
  int mov = 0;
  while (true) {
    if (str.size() < 2 || str == "00" || str == "11") break;
    for (int i = 0; i < str.size() - 1; ++i) {
      if (str[i] == '0' && str[i + 1] == '1' ||
          str[i] == '1' && str[i + 1] == '0') {
        str.erase(i, 2);
        mov++;
        break;
      }
    }
  }
  cout << 2 * mov;
  return 0;
}
