function Main(input) {
 var In = input.split('');
  var count = 0;
  
  for(var i = 0; i < 3; i++){
    if(In[i] == '1'){
      count += 1;
    }
  }
  console.log(count);
}

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