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