N=int(raw_input()) if N<4: print 4 elif N%2==1: print N+1 else: print N