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.
#coding=utf-8
import re
import sys


def factorial(n):
    if not n:
        return 1
    else:
        return reduce(lambda x, y: x * y, xrange(1, n + 1))


def fibonacci():
    a, b = 1, 1
    while True:
        yield a
        a, b = b, a + b


def is_pandigital(num, s=9):
    n = str(num)
    return len(n) == s and not '1234567890'[:s].strip(n)


def is_prime(n):
    if n <= 1:
        return False
    for i in xrange(2, int(n ** 0.5) + 1):
        if n % i == 0:
            return False
    return True


def prime_list(n):
    begin_list = [0, 0] + [1] * (n - 1)
    for i in xrange(2, int(n ** 0.5) + 1):
        if begin_list[i]:
            for j in xrange(i, n / i + 1):
                begin_list[j * i] = 0
    return [i for i in xrange(len(begin_list)) if begin_list[i] == 1]


def sum_of_divisors_of_num(number):
    result = 1
    for x in xrange(2, int(number ** 0.5) + 1):
        if number % x == 0:
            result += x
            if x != number / x:
                result += number / x
    return result


def latest_bigger_int(num):
    if float(num) < 0:
        return 0
    elif num == int(num):
        return int(num)
    else:
        return int(num) + 1


def gcd(first, second):
    if (first < second):
        first, second = second, first
    while second != 0:
        first, second = second, first % second
    return first


def main():
    temp = map(int,raw_input().split())
    n = temp[0]
    a = temp[1]
    b = temp[2]
    print len(set(range(n)[a:])&set(range(n)[-b-1:]))


if __name__ == '__main__':
    main()
