<reponame>PetkoAndreev/Python-basics<gh_stars>0
n = int(input())
combinations = 0
for i in range(0, n + 1):
    for j in range(0, n + 1):
        for k in range(0, n + 1):
            if i + j + k == n:
                combinations += 1
print(combinations)
n = int(input())
combinations = 0
for i in range(0, n + 1):
    for j in range(0, n + 1):
        for k in range(0, n + 1):
            if i + j + k == n:
                combinations += 1
print(combinations)