#include using namespace std; long int sumOfGroup(int k) { // Return the sum of the elements of the k'th group. long int sum = 0, flag = 0; long int x = 1, y = 1; for (int i = 1; i < 1000001; i+=2) { if (x == k || flag == 1) { flag = 1; while (x > 0) { sum += i; //cout << sum << endl; x--; break; } if (x == 0) { return sum; } continue; } if (flag && x == 0) { cout << sum << endl; return sum; } while (x > 0) { x--; break; } if (x == 0) { y++; x = y; } } return sum; } int main() { int k; cin >> k; long int answer = sumOfGroup(k); cout << answer << endl; return 0; }