#include #include #include #include #include #define DEBUG int getInputNumber( const std::string& ); std::vector split( const std::string&, std::string ); int main() { std::cin.sync_with_stdio( false ); std::cin.tie( 0 ); // get input from stdout std::string input; int current_stage = 0, floor_num_in_home = 0; if ( std::getline( std::cin, input ) ) { std::vector argv = split( input, " " ); if ( argv.size() > 1 ) { current_stage = getInputNumber(argv[0]); floor_num_in_home = getInputNumber(argv[1]); } else { return -1; } } int ans = 1; ans += std::floor( static_cast( current_stage ) / floor_num_in_home ); std::cout << ans << std::endl; return 0; } int getInputNumber( const std::string& input ) { int input_number = 0; try { input_number = std::stoi( input ); } catch ( std::invalid_argument& ) { return 0; } catch ( std::out_of_range& ) { return 0; } return input_number; } std::vector split( const std::string& str, std::string delim ) { std::vector result; result.reserve( 8 ); std::string::size_type pos = 0; while ( pos != std::string::npos ) { std::string::size_type current = str.find( delim, pos ); if ( current == std::string::npos ) { result.push_back( str.substr( pos ) ); break; } else { std::string tmp = str.substr( pos, current - pos ); if ( !tmp.empty() ) { result.push_back( tmp ); } } pos = current + delim.length(); } return result; }