#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long int ll; typedef pair P; #define all(x) x.begin(),x.end() const ll mod = 1e9+7; const ll INF = 1e9; const ll MAXN = 1e9; int main() { int l,r,m; cin>>l>>r>>m; int ans = 0; if(r-l+1>=m) ans = m; else ans = r-l+1; cout<