inputLine = input() split_input = inputLine.split() L = int(split_input[0]) K = int(split_input[1]) print(K * (L // (K * 2)))