function Main(input) { var inp = input.split("\n"); inp = inp.map(x => parseInt(x)); var sum = 0; for(var i = 0; i < inp.length; i++) { sum = sum + inp[i] } console.log(sum); } Main(require("fs").readFileSync("/dev/stdin", "utf8"));