@staticmethod
def a():
    a = int(sys.stdin.readline().rstrip())
    print((a * ((1 + a) + (a ** 2))))
@staticmethod
def a():
    a = int(sys.stdin.readline().rstrip())
    print((a * ((1 + a) + (a ** 2))))