function Main(input) {
  let result = 0;
  const arr = input.split("");
  for (const num of arr) {
    if (num === "1") {
      result++;
    }
  }
  console.log(result);
}

Main(require("fs").readFileSync("/dev/stdin", "utf-8"));
