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 java.io.*;
import java.util.*;

public class A_The_number_of_positions {
    double PI = 3.141592653589793238462643383279502884197169399375105820974944;
    int MOD = 1000000007;

    public static void main(String[] args) {
        FastScanner f = new FastScanner();

        int n=f.ri();
        int a=f.ri();
        int b=f.ri();
       System.out.println(Math.min(n-a,(b+1)));

    
    }

    // any other class you make,make it static.




    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String rs() {
            while (!st.hasMoreTokens())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int ri() {
            return Integer.parseInt(rs());
        }

        int[] rarr(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = ri();
            return a;
        }

        long rl() {
            return Long.parseLong(rs());
        }
    }

    static void sort(int[] a) {
		ArrayList<Integer> l=new ArrayList<>();
		for (int i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}

    static int gcd(int a, int b) {
        return (b == 0) ? a : gcd(b, a % b);
    }

    static long ncr(int n, int k) // note it returns long
    {
        if (k > n - k) {
            k = n - k;
        }
        long c[] = new long[k + 1];
        c[0] = 1;
        for (int i = 1; i <= n; i++) {
            for (int j = Math.min(i, k); j > 0; j--) {
                c[j] = c[j] + c[j - 1];
                // c[j]=c[j]%(1000000000+7);when asked or int is used instead of long
            }
        }
        return c[k];
    }

}
