console.log(Array.from({ length: parseInt(require('fs').readFileSync('/dev/stdin', 'utf8')) }, (_, i) => i).reduce((v, sum) => sum + v, 0));