i[];main(j,k){while(gets(i)){for(j=1,k=0;j<=atoi();)k+=j*j++;printf("%d\n",k);}}