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