#include #include long round(double x) { if (x < 0) { return -round(-x); } double fractional = fmod(x, 1.0); if (fractional >= 0.5) { return static_cast(ceil(x)); } else { return static_cast(floor(x)); } } int main() { double number; while (std::cin >> number) { std::cout << round(number) << std::endl; } }