import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int len = sc.nextInt(); int bite = sc.nextInt(); int eat = 0; while((len - bite * 2) > 0){ len -= bite * 2; eat += bite; } System.out.println(eat); } }