def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

ans2 = [0 for i in range(4001)]
ans3 = [0 for i in range(4001)]
ans4 = [0 for i in range(4001)]

for i in range(1001):
    ans2[i] = i + 1
for i in range(1001,4001):
    ans2[i] = 1001

for i in range(4001):
    for j in range(i+1):
        ans3[i] += ans2[j]

for i in range(4001):
    for j in range(i+1):
        ans4[i] += ans3[j]

#print("DONE")
N = list(get_input())
for l in range(len(N)):
    print(ans4[int(N[l])])
