function Main(input) {
  const number = input.split("");
  var count = 0;
  for (var i = 0; i<number.length; i++ ) {
  if (number[i] === 1) {
      count++;
    }
  }
  console.log(count);
}

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