#include int main(void) { int l, k, i=0; scanf("%d %d", &l, &k); while (l - (k*2) > 0) { l -= k*2; i++; } printf("%d\n", k*i); return 0; }