function Main(input) {
  arr = input.split("");
  var s = 0;
  if(arr[0] == "1"){ ++s; }
  if(arr[1] == "1"){ ++s; }
  if(arr[2] == "1"){ ++s; }
  console.log('%d',s);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));