def solve(n):
	ans=0
	for a in range(int(n/4)+1):
		for b in range(a,int(n/3)+1):
			for c in range(b,int(n/2)+1):
				d=n-(a+b+c)
				if d>=c:
					if a==b==c==d:
						ans+=1#4!/4!
					elif a==b==c or b==c==d:
						ans+=4#4!/3!
					elif a==b and c==d:
						ans+=6#4!/(2!*2!)
					elif (a==b and c!=d) or (b==c) or (a!=b and c==d):
						ans+=12#4!/2!
					else:
						ans+=24#4!
				else:
					break
	return ans 


while True:
	try:
		n=int(input())
		print(solve(n))
	except EOFError:
		break