def doc_string():
    """
    I can fly.
    """
while True:
    if __name__ == "__main__":
        count = 0
        judge = False
        try:
            n = int(raw_input())
        except EOFError:
            break
        for a in xrange(1000):
            if a > n:
                break
            for b in xrange(1000):
                if b > n:
                    break
                for c in xrange(1000):
                    if c > n:
                        break
                    for d in xrange(1000):
                        if a + b + c + d == n:
                            count += 1
                        if d > n:
                            break
        print count