<?php

fscanf(STDIN,"%s",$numbers);

//1と0の数を数える
$count0 = substr_count($numbers,"0");
$count1 = substr_count($numbers,"1");

if ($count0 > $count1){
    echo $count1 * 2;
}elseif ($count1 > $count0){
    echo $count0 * 2;
}
