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