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 (l > 0) { l -= 2 * k; c++; } System.err.println((c - 1) * k); scan.close(); } }