import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String[] inputs = reader.readLine().split(" "); long L = Long.parseLong(inputs[0]); int K = Integer.parseInt(inputs[1]); int yuu = 0; while (2*K < L) { yuu += K; L -= 2 * K; } System.out.println(yuu); } }