import java.util.Scanner; public class No63 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int L = sc.nextInt(); int K = sc.nextInt(); if(L/2<=K) { System.out.println(0); }else { System.out.println(L/K/2*K); } } }