import java.util.Scanner; public class Run { public static void main (String arg[]) { Scanner scan = new Scanner(System.in); int L = scan.nextInt(); int K = scan.nextInt(); if (L < 1||L > 1000000000||K < 1||K > 50) System.exit(1); System.out.println((L-1)/(2*K) * K); } }