'use strict'

let Main = (input) => {
  let v = []
  v[0] = input.substr(0,1)
  v[1] = input.substr(1,1)
  v[2] = input.substr(2,1)
  let count = 0
  for(let i=0; i <= v.length-1; i++){
    if(v[i] == '1') count++
  }
  console.log(count)
}

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