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

public class JavaApplication1 implements Runnable {
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");
    final boolean OJ = System.getProperty("ONLINE_JUDGE") != null;
    
    void init() throws FileNotFoundException {
        if (OJ) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("Input.txt"));
            out = new PrintWriter("Output.txt"); 
        }
    }
    
    @Override
    public void run() {
        try {
            init();
            solve();
            out.close();
        } catch(Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }
    
    public static void main(String[] args) {
        new Thread(null, new JavaApplication1(), "", (1L << 20) * 256).start();
    }
    
    String readString() {
        while(!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch(Exception e) {
                e.printStackTrace();
                System.exit(-1);
            }
        }
        return tok.nextToken();
    }
    
    int readInt() {
        return Integer.parseInt(readString());
    }
    
////////////////////////////////////////////////////////////////////////////////
    
    class Pair implements Comparable {
        public int a, b;
        public Pair(int a, int b) {
            this.a = a;
            this.b = b;
        }
        public int compareTo(Object x) {
            int cx = ((Pair)x).a;
            int cy = ((Pair)x).b;
            if (a > cx) {
                return 1;
            } else if (a < cx) {
                return -1;
            } else {
                if (b > cy) {
                    return 1;
                } else if (b < cy) {
                    return -1;
                } else {
                    return 0;
                }
            }
        }
        
    }
    
    
    
    
    void solve() {
        int n = readInt();
        int a = readInt();
        int b = readInt();
        int ans = 0;
        for(int i = a + 1; i <= n; i++) {
            if (n - i <= b) ans++;
        }
        out.println(ans);
    }
    
}