function Main (input) {    var N = parseInt(line[0]); var data = line[1].split(" "); calc(N,data) } function calc(N,data) { var sum = 0; for (var i= 0; i< N; i++){ sum += parseInt(data[i]); } console.log(sum); } Main(require("fs").readFileSync("/dev/stdin", "utf8"));