"use-strict";
// import bigInt from 'big-integer'

const Main = input => {
  const nums = input.trim().split("");
  console.log(nums.filter(num => num === "1").length);
};

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