const lineIter = (function* () { const stdin = require('fs').readFileSync(process.stdin.fd, 'utf8'); const lines = stdin.trim().split('\n'); for (const line of lines) { yield line.trim(); } })(); const wordIter = (function* () { while (true) { const { done, value: line } = lineIter.next(); if (done) { break; } const words = line.split(' '); for (const word of words) { yield word; } } })(); const read = () => wordIter.next().value; const main = async () => { const n = parseInt(read()); const sum = Array(n) .fill() .map((_, i) => i + 1) .reduce((acc, num) => acc + num, 0); console.log(`${sum}`); }; (async () => { try { await main(); } catch (e) { console.error(e); } })();