# -*- coding: utf-8 -*- N = int(input()) for i in range(N-100, N+101, 1): if i%2==0 and i!=2: print(i) break