AC
#include<bits/stdc++.h> using namespace std; int main(){ int n,l,r; cin>>n>>l>>r; if(l/n==r/n) cout<<n%r; else cout<<l-1; return 0; }
9行!!