import java.math.BigInteger;
import java.util.Scanner;
public class Main {
public static void main(String[]args){
BigInteger n,a,b;
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
n = sc.nextBigInteger();
if(n.equals(BigInteger.ZERO)){
System.out.println("1");
continue;
}
a = n.subtract(BigInteger.ONE);
b = BigInteger.ONE;
b = b.add(b);
System.out.println((n.multiply(a)).add(b));
}
}
}