function Main(input) { const num = input.split("\n"); console.log(num); var res = 0; for (i = 1; i <= num; i++) { res += i } console.log(res); } // Don't edit this line! Main(require("fs").readFileSync("/dev/stdin", "utf8"));