ction main(input) {
  const nums=(""+input).split("");
  // nums=["1","0","0"];
  let sum=0;
  for(let i=0;i<=2;i++){
   if(nums[i]=="1")sum++; 
  }
  console.log(sum);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));