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