print((function (n) return (n==1000 or n%2==0) and n or n+1 end)(io.stdin:read("*n")))