Petr stands in line of n people, but he doesn't know exactly which position he occupies. He can say that there are no less than a people standing in front of him and no more than b people standing behind him. Find the number of different positions Petr can occupy.

Input

The only line contains three integers n, a and b (0 ≤ a, b < n ≤ 100).

Output

Print the single number — the number of the sought positions.

Examples

Input

3 1 1


Output

2


Input

5 2 3


Output

3

Note

The possible positions in the first sample are: 2 and 3 (if we number the positions starting with 1).

In the second sample they are 3, 4 and 5.
import math
from bisect import bisect_left,bisect,bisect_right
from itertools import accumulate

def index(a, x):
    'Locate the leftmost value exactly equal to x'
    i = bisect_left(a, x)
    if i != len(a) and a[i] == x:
        return i
    raise ValueError

def find_lt(a, x):
    'Find rightmost value less than x'
    i = bisect_left(a, x)
    if i:
        return a[i-1]
    raise ValueError

def find_le(a, x):
    'Find rightmost value less than or equal to x'
    i = bisect_right(a, x)
    if i:
        return a[i-1]
    raise ValueError

def find_gt(a, x):
    'Find leftmost value greater than x'
    i = bisect_right(a, x)
    if i != len(a):
        return a[i]
    raise ValueError

def find_ge(a, x):
    'Find leftmost item greater than or equal to x'
    i = bisect_left(a, x)
    if i != len(a):
        return a[i]
    raise ValueError



st=''

def func(n,a,b):
    return max(0,n-(max(a,n-b-1)))












for _ in range(1):#int(input())):
    n,a,b=map(int,input().split())
    #n = int(input())
    #inp=input().split()
    #s=input()
    #l1=[]
    #l1=list(map(int,input().split()))
    #l1=list(accumulate(list(map(int,input().split()))))
    #q=int(input())
    #l2 = list(map(int, input().split()))
    #l1=input().split()
    #l2=input().split()
    #func(n,m)
    st+=str(int(func(n,a,b)))+'\n'
print(st)