n,m = list(map(int,input().split())) cou = 0 n = n // 2 while True: n -= m if n < 1: break cou += 1 print(cou*m)