import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int l = scan.nextInt(); int k = scan.nextInt(); int c = 0; while (true) { l -= 2 * k; if (l <= 0) { break; } else { c++; } } System.out.println(c * k); scan.close(); } }