const Main = (input) => {
  var arr = input.split('');
  var count = 0;
  for(var i=0, l=arr.length; i<l; i++) {
    if(arr[i] === '1') count++;
  }
  console.log(count);
};

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