'use strict'
 
function Main(input) {
    var params = input.split('\n')[0];
    
    let sum = 0;
    params.split('').map(c => {
        if (c == '1') sum++;
    })
    console.log(sum);
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));