#include using namespace std; int main() { int L, K; cin >> L >> K; int count = 0; while (L > 0){ L -= 2 * K; count++; } cout << K * (count - 1) << endl; }