#include using namespace std; int main(){ int L, K; cin >> L >> K; cout << int(L / 2.0 / K) * K << endl; }