import java.util.Scanner; public class No63 { public static void main(String[] args) { Scanner s = new Scanner(System.in); int pocky = s.nextInt(); int bite = s.nextInt(); int eachBite = bite * 2; int biteTime = pocky / eachBite; if (pocky % eachBite == 0) { biteTime--; } System.out.println(biteTime * bite); } }