#include <stdio.h> long int arr[1000002]; void array () { long int k=0,i; arr[3]=0; for( i = 4; i <= 1000000; i++) { k = k + ((i-2)/2); arr[i] = arr[i-1] + k; } } int main() { //array(); long int n; array(); while(scanf("%ld",&n) && n >= 3) printf("%ld\n",arr[n]); return 0; }