def y(x): if x < 0: return x**2 else: return x+7 x = int(input()) print(y(x))