function main(arg) {
	var s = arg.split("\n")[0]
	var l0 = s.split("0").length - 1
	var l1 = s.split("1").length - 1
	var min = (l0  < l1) ? l0 : l1
	console.log(min * 2)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));