const main = i => console.log(
  ('-' + i)
    .split(/\s/)
    .map(n => parseInt(n))
    .filter(n => !isNaN(n))
    .reduce((prev, curr) => prev + curr, 0)
)

main(require('fs').readFileSync('/dev/stdin', 'utf-8'))
