using System;
public class Program
{
public static void Main()
int s=0, x=int.Parse(Console.ReadLine());
int a,b,c,d;
/*d=x%10;
c=(x/10)%10;
b=(x/100)%10;
a=x/1000;*/
for (int i=1; i<x; i++)
for (int j=i; j<x; j++)
for (int k=j; k<x; k++)
for (int t=k; t<x; t++)
if (x==i+j+k+t) s++;
}
Console.WriteLine(s);