N = int(raw_input()) for i in xrange(max(1, N - 100), N + 101): if i %2 == 0 and i / 2 > 1: print i break