#include int main(void) { int K, L; int i; scanf("%d%d",&L,&K); i = L/(2*K); if (i==1){ printf("%d", 0); } else{ printf("%d", i*K); } return 0; }