function main(argString) {
  const input = argString.split(' ');
  let number = 0;
  input.split('').forEach(v => {
    if (v === 1) number++;
  });
  console.log(number);
}

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