n=int(input()) if n%2:print(n) elif n-2:print(n/2) else:print(1)