function Main(input) {
  var count = 0;
  input = input[0];
  var s1 = input[0];
  if (s1 === '1') {
    count ++;
  }
  var s2 = input[1];
  if (s2 === '1') {
    count ++;
  }
  var s3 = input[2];
  if (s3 === '1') {
    count ++;
  }
  console.log(count);
}

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