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

/*
 * @author Mahmoud Aladdin <aladdin3>
 *
 */
 
public class Main {
    public static void main (String[] args) throws java.lang.Exception {
		InputReader scan = new InputReader(System.in);
		PrintWriter writer = new PrintWriter(System.out, true);
		(new Main(scan, writer)).run();
		writer.close();
    }
    
    private InputReader jin;
    private PrintWriter jout;
    
    public Main(InputReader in, PrintWriter out) {
    	this.jin  = in;
    	this.jout = out;
    }
        
    public void run() throws Exception {
		int n = jin.integer();
		int a = jin.integer();
		int b = jin.integer();
		int ans = 0; 
		int aa = n - 1;
		int bb = 0;
		while(aa >= a && bb <= b) {
			ans++; aa--; bb++;
		}
		jout.println(ans);
    }
}
 
class InputReader {
    private static final int bufferMaxLength = 1024;
    private InputStream in;
    private byte[] buffer;
    private int currentBufferSize;
    private int currentBufferTop;
    private static final String tokenizers = " \t\r\f\n";
    
    public InputReader(InputStream stream) {
        this.in = stream;
        buffer = new byte[bufferMaxLength];
        currentBufferSize = 0;
        currentBufferTop = 0;
    }
    
    private boolean refill() throws IOException {
        this.currentBufferSize = this.in.read(this.buffer);
        this.currentBufferTop = 0;
        return this.currentBufferSize > 0;
    }
    
    
    private Byte readChar() throws IOException {
        if(currentBufferTop < currentBufferSize) {
            return this.buffer[this.currentBufferTop++];
        } else {
            if(!this.refill()) {
                return null;
            } else {
                return readChar();
            }
        }
    }
    
    
    public String token() throws IOException {
        StringBuffer tok = new StringBuffer();
        Byte first;
        while((first = readChar()) != null && (tokenizers.indexOf((char) first.byteValue()) != -1));
        if(first == null) return null;
        tok.append((char)first.byteValue());
        while((first = readChar()) != null && (tokenizers.indexOf((char) first.byteValue()) == -1)) {
            tok.append((char)first.byteValue());
        }
        return tok.toString();
    }
    
    public String line() throws IOException {
		Byte first;
		StringBuffer line = new StringBuffer();
		while ((first = readChar()) != null && (char)first.byteValue() != '\n') {
			line.append((char)first.byteValue());
		}
		return (first == null && line.length() == 0)? null : line.toString();
    }
    
    public Integer integer() throws NumberFormatException, IOException {
        String tok = token();
        return tok == null? null : Integer.parseInt(tok);
    }
    
}
