const Main = (input) => {
    input = input.split("");
    var sum = 0;

    if (input[0] === '1') sum++;
    if (input[1] === '1') sum++;
    if (input[2] === '1') sum++;

    console.log(sum);

}

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