N = int(input()) for i in range(N-100, N+100+1): if i % 2 == 0 and i > 3: print(i) exit()