#include <stdio.h>
#include <stdlib.h>
int main()
{
int n,i, j, k, count;
scanf("%d", &n);
count = 0;
for (i = 2; i <= n-5; i++)
{
for (j = i + 2; j <= n-3; j++)
{
for (k = j + 2; k <= n-1; k++)
{
count++;
}
}
}
printf("%d", count);
return 0;
}