import java.util.Scanner; class Wandbox { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int l = sc.nextInt(); int k = sc.nextInt(); int ans = 0; l /= 2; while (l > 0) { l -= k; if (l <= 0) { break; } ans += k; } System.out.println(ans); } }