
fn func(input_str: &str) -> u32 {
    input_str.chars().fold([0_u32, 0], |[r, b], x| {
        if x == '0' {
            [r + 1, b]
        } else {
            [r, b + 1]
        } }).iter().min().unwrap() * 2
}

use std::io::Read;

fn main() {
    let mut buf = String::new();
    std::io::stdin().read_to_string(&mut buf).unwrap();
    println!("{}", func(&buf[..]));
}
