#include int main() { int length, e; std::cin >> length >> e; int count = 0; while (length != 0) { if (length <= e * 2) { length = 0; }else{ length -= e * 2; count++; } } std::cout << count * e << std::endl; return 0; }