function Main (input) {
  const s = input.split('')
  var c = 0
  for (var i = 0; i < s.length; i++) {
    if (s[i] === '1') {
      c++
    }
  }
  console.log(c)
}
Main(require('fs').readFileSync('/dev/stdin', 'utf8'))
