import java.io.*; class no63 { public static void main(String args[])throws IOException { BufferedReader sc=new BufferedReader(new InputStreamReader(System.in)); String lk[]=sc.readLine().split(" "); int l,k,ans=0; l=Integer.parseInt(lk[0]); k=Integer.parseInt(lk[1]); while(l>0) { l-=2*k; if(l<=0)break; ans++; } System.out.println(ans*k); } }