"use strict"
let fs = require('fs');
let input = fs.readFileSync("/dev/stdin", "utf8").split(/\s/);

let blocks = input[0];
let count = 0;
let isComp = false;
let i = 0;

while(!isComp) {
  for(i=0; i<blocks.length; i++) {
    if(blocks[i] + blocks[i+1] == '01') {
      blocks = blocks.replace('01', '');
      count += 2;
      break;
    } else if (blocks[i] + blocks[i+1] == '10') {
      blocks = blocks.replace('10', '');
      count += 2;
      break;
    }
  }
  isComp = i === blocks.length;
}
console.log(count);