#include #define rep(i, ss, ee) for (int i = ss; i < ee; ++i) using namespace std; int main() { int L, K; cin >> L >> K; if (L <= 2 * K) { cout << 0 << endl; } else { cout << (L / (K * 2)) * K << endl; } getchar(); }