#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #define INF 1050000000 #define SIZE 4 #define MOD 1000000007 using namespace std; int main(void) { int l, k; cin >> l >> k; cout << (l - 1 / (2 * k)) * k << endl; return (0); }