#include <bits/stdc++.h>
using namespace std;
bool check(int a, int b) { return a > b; }
int main() {
  char s[100010];
  cin >> s;
  int n = strlen(s);
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    a[i] = s[i] - '0';
  }
  int cnt = 0;
  int tmp;
  int j;
  for (int i = 0; i < n - 1; i++) {
    j = i + 1;
    while (j < n && a[j] == -1) {
      j++;
    }
    if (j == n) {
      break;
    }
    if (a[i] + a[j] == 1) {
      if (a[i] == -1) continue;
      cnt++;
      a[i] = -1;
      a[j] = -1;
      while (0 <= i) {
        if (a[i] == -1) {
          i--;
        } else {
          break;
        }
      }
      if (i == -1) {
        continue;
      } else {
        i--;
      }
    }
  }
  cout << cnt * 2 << endl;
  return 0;
}
