import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = Integer.valueOf(scan.nextLine().trim());
System.out.println(n * 2 + ((int) (Math.pow(n, 2) * 3 - n * 3) >> 1));
}
}