const main = () => {
  const s = getParams();
  console.log(solve(s));
};

const getParams = () =>
  getStdin();

const getStdin = () =>
  require('fs').readFileSync('/dev/stdin', 'utf8').trim();

const solve = s =>
  s.split('').filter(c => c === '1').length;

main();
