#include int main() { int l, k; scanf("%d%d", &l, &k); int a = 0; while (k * 2 < l) { l -= k * 2; a += k; } printf("%d", a); return 0; }