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