function main(input = "") { if (!input) throw Error; let sum = 0; for (let i = 1; i <= parseInt(input); i++) { sum += i; } return sum; } const { readFileSync, existsSync } = require("fs"); const stdin = "/dev/stdin"; if (existsSync(stdin)) { const input = readFileSync(stdin, "utf8"); console.log(main(input)); } module.exports = main;