import java.util.Scanner; class No_192 { public static void main(String args[]) { Scanner stdIn = new Scanner(System.in); int num = stdIn.nextInt(); if (4 <= num) { if (num % 2 == 0) { System.out.println(num); } else { System.out.println(num-1); } } } }