/*No.5 No.63 ポッキーゲーム*/ import java.util.*; public class NO63 { public static void main(String[] args) { int p_len,eat_len,Yuchan=0; try(Scanner input = new Scanner(System.in)){ p_len=input.nextInt(); eat_len=input.nextInt(); while(p_len>0){ p_len-=eat_len*2; Yuchan++; } System.out.println((Yuchan-1)*eat_len); }catch(Exception e){ e.printStackTrace(); } } }