import math L, K = map(int,input().splite()) mm = L/(K*2) * K print(int(mm))