https://codeforces.com/problemset/problem/124/A
#include<bits/stdc++.h>
using namespace std;
int main(void)
{
int n,a,b; cin>>n>>a>>b;
int ans1=n-a;
int ans2=b+1;
cout<<min(ans1,ans2);
return 0;
}
https://codeforces.com/problemset/problem/124/A
#include<bits/stdc++.h>
using namespace std;
int main(void)
{
int n,a,b; cin>>n>>a>>b;
int ans1=n-a;
int ans2=b+1;
cout<<min(ans1,ans2);
return 0;
}