#include int main(void){ long long int L,K,ans; scanf("%lld%lld",&L,&K); ans=L/(2*K); ans*=K; printf("%lld",ans); return 0; }