x = int(input()) if x < 3: print(x - 1) else: print(x + 3)