function Main(input) {
  let result = 0;
  let arr = input.split("");
  for (let i in arr) {
    if (arr[i] === "1") {
      result++;
    }
  }
  console.log(result);
}

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