"use strict";
function Main(input) {
    let s = input.split("\n")[0].split('').map((v) => +v);
    let ans = 0;
    for (let n = 0; n < s.length - 1; n++) {
        if (s[n] + s[n+1] == 1) {
            ans += 2;
            s.splice(n, 2);
            n -= 2;
        }
    }
    console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
