use std::io::Read;
use std::cmp::min;

fn main() {
    let mut s = String::new();
    std::io::stdin().read_to_string(&mut s).unwrap();
    
    let mut count_0 = 0;
    let mut count_1 = 0;
    
    for c in s.chars() {
        match c {
            '0' => count_0 += 1,
            '1' => count_1 += 1,
            _ => unreachable!(),
        }
    }
    
    println!("{}", min(count_0, count_1) * 2);
}