'use strict'

function Main(input) {
  const inputList = input.split('');
  let count = 0;

  for (let i=0; i<inputList.length; i++) {
    if (inputList[i] === '1') count++
  }
  console.log(count)
}

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