function main (input){
  input = input.split('');
  var a = input[0];
  var b = input[1];
  var c = input[2];
  let count = 0;
  
  if(a === '1'){
    count++;
  }
   if(b === '1'){
    count++;
  }
   if(c === '1'){
    count++;
  }
  console.log(count);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));