function Main(input) {
    nums = input.split("");
    var count = 0
    for (var i = 0; i < nums.length; i++) {
        if (nums[i] === "1") {
            count++
        }
    }
    console.log(count)
  
    }
  Main(require("fs").readFileSync("/dev/stdin", "utf8"));
  