process.stdin.resume(); process.stdin.setEncoding('ascii'); var input_stdin = ""; var input_stdin_array = ""; var input_currentline = 0; process.stdin.on('data', function (data) { input_stdin += data; }); process.stdin.on('end', function () { input_stdin_array = input_stdin.split("\n"); main(); }); function readLine() { return input_stdin_array[input_currentline++]; } /////////////// ignore above this line //////////////////// function sumOfgroup(k) { let sum = 0; let oddArr = []; let limit = Math.pow(10,6); // populate array with odd numbers for (let i = 0; i < limit; i++) { if (i % 2 != 0) oddArr.push(i); } // find index of group K let num = k - 1; let kIndex = num * (num + 1) / 2 // get sum of odd numbers in group K for(let i = kIndex; i < (kIndex + k); i++) { sum += oddArr[i]; } return sum; } function main() { var k = parseInt(readLine()); var answer = sumOfgroup(k); process.stdout.write("" + answer + "\n"); }