//============================================================================ // Name : yuki63.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include using namespace std; int main() { int l, k; cin >> l >> k; if(l%(2*k)==0) { cout << k * ((l/(2*k)) - 1) << endl; }else { cout << k * (l/(2*k)) << endl; } return 0; }