#include using namespace std; int main() { unsigned L, K; cin >> L >> K; if (L <= 2 * K) { cout << 0 << endl; } else { cout << (L / (K * 2)) * K << endl; } getchar(); }