import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader buff = new BufferedReader(new InputStreamReader(System.in)); try { String[] box = buff.readLine().split(" "); int L = Integer.parseInt(box[0]); int K = Integer.parseInt(box[1]); int count = 0; while(L - K * 2 > 0){ count++; L -= K *2; } System.out.println(count * K); } catch (NumberFormatException e) { } catch (IOException e) { } } }