a=[int(i) for i in input().split()] c=a[0]//(a[1]*2) print(a[1]*c)