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; while(l > (2 * k)){ l = l - k * 2; count++; } System.out.println(k * count); } }