import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int n = N - 100; int d = 0; if(N % 2 == 0){ System.out.println(N); } while(d == 0){ if(n % 2 == 0&&n!=2){ System.out.println(n); d++; }else{ n++; } } } }