import math m = list(map(int,input().split())) L = m[0] K = m[1] s = math.floor(L/(2*K)) print(s * K)