#include using namespace std; typedef long long ll; typedef string str; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); double a, b; cin >> a >> b; double c = a / 2; if (c / b == 1.0) cout << 0; else { ll d = c / b; cout << d * (ll)b; } return 0; }