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