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