function Main(input) { var data = input.split("\n") const nums = data[0].split(' ').map(str => parseInt(str, 10)); const sum = nums.reduce( (sum, num) => sum + num, 0); console.log(sum, data[1]); } // Don't edit this line! Main(require("fs").readFileSync("/dev/stdin", "utf8"));