import fs = require('fs');
const input = fs.readFileSync('/dev/stdin', 'utf8').trim();
const numbers = input.split('').map(Number);

let answer = 0;
for(let i=0; i<numbers.length-1; i++) {
	const n1 = numbers[i+0];
	const n2 = numbers[i+1];

	if(n1+n2 === 1) {
		numbers.splice(i, 2);
		answer += 2;
		i = Math.max(0, i-2);
	}
}
console.log(answer);