#include<iostream> using namespace std; int main() { int a,b,n; cin>>n>>a>>b; if(a+b<n)cout<<b+1<<endl; else cout<<n-a; }