import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No0063 { public static void main(String[] args) { try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { String[] str = br.readLine().split(" "); int L = Integer.parseInt(str[0]); int K = Integer.parseInt(str[1]); int cnt; for(cnt = 0; L > (K * 2); cnt++){ L -= K * 2; } System.out.println(K * cnt); } catch (IOException e) { e.printStackTrace(); } } }