'use strict';

const main=(input)=>{
  let count = 0;
  const args = input.trim().split('');
  const num1 = args[0];
  const num2 = args[1];
  const num3 = args[2];
  
  if(num1 ==='1' ){
    count += 1;
  };
  if(num ==='1'){
    count += 1;
  };
  if(num3 ==='1'){
    count += 1;
  };
  console.log(count); 
};

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
