// This file is a "Hello, world!" in C++ language by GCC for wandbox. #include #include #include using namespace std; int main(){ int l , r , m; cin >> l >> r >> m; int ans; if(r - l + 1 >= m)ans = m; else ans = r - l + 1; cout << ans << endl; } // GCC reference: // https://gcc.gnu.org/ // C++ language references: // https://cppreference.com/ // https://isocpp.org/ // http://www.open-std.org/jtc1/sc22/wg21/ // Boost libraries references: // https://www.boost.org/doc/