#include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<long, long>;
template <class T>
using V = vector<T>;
template <class T>
using VV = V<V<T>>;
string alphabet_upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
string alphabet_lower = "abcdefghijklmnopqrstuvwxyz";
string numbers = "0123456789";
int keta_sum(int num) {
  int dig, sum = 0;
  while (num) {
    dig = num % 10;
    sum = sum + dig;
    num = num / 10;
  }
  return sum;
}
ll binary_search(ll left_key, ll border, ll low, ll high) {
  ll mid = (low + high) / 2;
  while (high > low + 1) {
    mid = (low + high) / 2;
    if (left_key * mid > border)
      high = mid;
    else if (left_key * mid < border)
      low = mid;
    else {
      mid = mid - 1;
      break;
    }
  }
  return mid;
}
bool IsPrime(ll a) {
  ll b = sqrt(a);
  b++;
  while (b-- >= 2) {
    if (a % b == 0) return false;
  }
  return true;
}
ll gcd(ll a, ll b) {
  ll tmp;
  if (a < b) {
    tmp = a;
    a = b;
    b = tmp;
  }
  ll r = a % b;
  while (r != 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
struct UnionFind {
  vector<int> par;
  UnionFind(int N) : par(N) {
    for (int i = 0; i < N; i++) par[i] = i;
  }
  int root(int x) {
    if (par[x] == x) return x;
    return par[x] = root(par[x]);
  }
  void unite(int x, int y) {
    int rx = root(x);
    int ry = root(y);
    if (rx == ry) return;
    par[rx] = ry;
  }
  bool same(int x, int y) {
    int rx = root(x);
    int ry = root(y);
    return rx == ry;
  }
};
int main(void) {
  ll N, M, A, B, C, D, E, F, K, L, W, H, P, Q, R, X, Y;
  ll ans;
  string S, T;
  cin >> S;
  ll count0 = 0, count1 = 0;
  for (int i = 0; i < S.length(); i++) {
    if (S[i] == '0')
      count0++;
    else
      count1++;
  }
  cout << min(count0, count1) * 2 << endl;
}
