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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Codeforces {
    private static final int INF = (int) 1e9;
    BufferedReader in;
    StringTokenizer st;

    public static void main(String[] args) throws Exception {
        new Codeforces().run();
    }

    void run() throws Exception {
        in = new BufferedReader(new InputStreamReader(System.in));
        int n = nextInt();
        int a = nextInt();
        int b = nextInt();

        n -= a;

        if (n > b) {
            System.out.println(b + 1);
        } else {
            System.out.println(n);
        }

    }


    String next() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    class pair implements Comparable<pair> {
        int x;
        int y;

        public pair(int x, int y) {
            this.x = x;
            this.y = y;
        }


        @Override
        public int compareTo(pair o2) {
            if (x < o2.x) {
                return -1;
            } else {
                if (x == o2.x) {
                    if (y < o2.y) {
                        return 1;
                    } else {
                        return -1;
                    }
                } else {
                    return 1;
                }
            }
        }

        String getVolume() {
            return x + " " + y;
        }

    }
}