package yukicoder; import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader read = new BufferedReader(new InputStreamReader(System.in)); try { int N = Integer.parseInt(read.readLine()); if(N % 4 == 0){ System.out.println(N); return; } int min = N - 100; while(min++ < N + 100){ if(min % 4 == 0){ break; } } System.out.println(min); } catch (Exception e) { e.printStackTrace(); } } }