n = int(input()) if n == 0 or n == 1: print(3) elif n % 2 == 0: print(n) else: print(n+1)