#include #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define REP(i, n) FOR(i, 0, n) using namespace std; int main() { int L, K, yuu = 0; cin >> L >> K; while (true) { L -= 2 * K; if (L > 0) { yuu += K; } else { break; } } cout << yuu << endl; return 0; }