#include using namespace std; int main() { int l, k, a; cin >> l >> k; while (l > 2 * k) { l -= 2 * k; a += k; } cout << a << endl; return 0; }