#include using namespace std; int main(int argc, char **argv) { char buf[64]; fgets(buf, sizeof(buf), stdin); int L, K; sscanf(buf, "%d %d", &L, &K); int yu = 0; for (;;) { if ((L -= 2 * K) <= 0) { break; } yu++; } printf("%d\n", K * yu); return 0; }