<filename>Codeforces/A_The_number_of_positions.py
n,a,b=list(map(int,input().split()))
print(min(n-a,b+1))
<filename>Codeforces/A_The_number_of_positions.py
n,a,b=list(map(int,input().split()))
print(min(n-a,b+1))