排队领水
#include<stdio.h>
int main(){
int n,a,b,position;
scanf("%d%d%d",&n,&a,&b);
if((a+b)>=n){
position=n-a;
}
else{
position=b+1;
}
printf("%d",position);
}
int main(){
int n,a,b,position;
scanf("%d%d%d",&n,&a,&b);
if((a+b)>=n){
position=n-a;
}
else{
position=b+1;
}
printf("%d",position);
}