function main(input){
  count = 0
  a = JSON.parse(JSON.stringify(input))
  for(i=0; i<3; i++){
    if(a[i] === 1){
      count++
    }
  }
  console.log(count)
}
main(require("fs").readFileSync("/dev/stdin","utf8"));