import java.util.Scanner; import java.lang.Math; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int L = sc.nextInt(); int K = sc.nextInt(); int ans = 0; while(L>0){ L -= 2*K; if(L<=0){ break; } ans++; } System.out.println(ans*K); } }