1. JAVA, Peter Schnitzler

/* Problem : 11401
* Author : Peter Schnitzler
* Status : AC
* Runtime : 0.51
*/

import java.util.Scanner;

public class Main
{

public static void main(String[] args)
{
long trigs [] = new long[1000001];

//how many more for each N
for (int count = 3; count < 1000001; count++)
{
int temp = count - 1;
temp = temp >> 1;

trigs[count] += (trigs[count - 1] + temp);
}


//the total for each N
for (int count = 4; count < 1000001; count++)
{
trigs[count]+= trigs[count - 1];
}



//input output
Scanner input = new Scanner(System.in);

while (true)
{
int newIn = input.nextInt();

if (newIn < 3)
{
break;
}

System.out.println(trigs[newIn - 1]);
}
}
}