function Main(input) {
  const lines = input.split('\n');
  const [a, b, c] = lines[0].split('').map(s => parseInt(s));
  const total = lines[0].split('').map(s => parseInt(s)).filter(i => !!i).length;
  console.log(total);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));