#include int main(){ int L,k,c=0;// c:萔 scanf("%d%d",&L,&k); c=2*k; c=L/c+(L%c==0?-1:0); printf("%d",c*k); return 0; }