1. 


/**
* Angewandte Mathematik, SS09, IFB 2C
* ACM Problem #913 (Joana and the odd numbers)
*
* @author David Leib
* @author Julius Tschannerl
* @version 1.0, 04/22/2009
*
* Status : Accepted
* Runtime: 0.150
*/

package Joana;

import java.util.Scanner;

public class Main {

public static void main(String... args)
{
Scanner sc = new Scanner(System.in);

while (sc.hasNext()){
long l = sc.nextLong();
long n = (l-1)/2+1;
long lastNumber = 2*n*n-1;
System.out.println((3*lastNumber)-6);
}
}
}