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