function main(input) {
 inputList = input.split('')
 var count = 0;
 inputList.forEach(function(num) {
  if (num == 1) { count++ }
 })
 console.log(count)
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));