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