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