import java.util.Scanner; public class yukicoder_63 { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int l = stdIn.nextInt(); int k = stdIn.nextInt(); int count = 0; while (l >= 2 * k + 1) { l = l - 2 * k; count++; } System.out.println(k * count); } }