1 import java.util.Scanner; 2 3 public class Christmas_Calvin { 4 public static void main(String[] args) { 5 Scanner in = new Scanner(System.in); 6 while(in.hasNext()) { 7 int n = in.nextInt(); 8 if (n == 0) { 9 break; 10 } 11 System.out.println(n*(n+1)*(n+2)/6); 12 } 13 in.close(); 14 } 15 }