# No.63 ポッキーゲーム s = [int(i) for i in input().split()] L = s[0] K = s[1] times = 0 while L - 2 * K > 0: times += 1 L -= 2 * K print(K * times)