function main(input) {
  var cnt = 0;
  for (var i = 0; i < 3; ++i) {
    if (input[i] === '1') {
      ++cnt;
    }
  }
  console.log(cnt);
}

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