function Main(input) {
  const number1 =input.substring(0, 1);
  const number2 =input.substring(1, 1);
  const number3 =input.substring(2, 1);
  const number = [number1, number2, number3];
  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"));