import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {

   static long sumOfGroup(int k) {
        // Return the sum of the elements of the k'th group.
    	
    	//creation list
        List<Integer> listOddNumber = new ArrayList<Integer>();
        int maxNumber = 10000;
        for (int i=1; i<=maxNumber; i++){
            if(i%2!=0){
                listOddNumber.add(i);
            }
        }
        // trouver l'indice de la list à laquel commence le groupe de k
        int a=0;
        while (k>0){
            a = a + --k;
        }
       
       
        long total = 0;
        for (int j=a; j>0; j--){
            total = total + listOddNumber.get(a);
            a=++a;
        }
        return total;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int k = in.nextInt();
        long answer = sumOfGroup(k);
        System.out.println(answer);
        in.close();
    }
}