use std::io::*;
use std::str::FromStr;

fn main() {
    let s: Vec<char> = read::<String>().chars().collect();
    let mut c0 = 0;
    let mut c1 = 1;
    for i in &s {
        if *i == '0' {
            c0 += 1;
        } else {
            c1 += 1;
        }
    }
    println!("{}", 2 * std::cmp::min(c0, c1));
}

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().unwrap()
}