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

public class Solution {
    public static void main(String[] args)throws IOException{
        IO io = new IO() ;
        ArrayList<Integer> params = io.getIntegerArray(3) ;
        int n = params.get(0), a = params.get(1), b = params.get(2) ;

        int l = Math.max(a + 1, n - b) ;
        System.out.println(n - l + 1);
    }
}

class Utils{
    static class IndexedElement<T>{
        int idx;
        T val ;
        public IndexedElement(int idx, T val){
            this.idx = idx ;
            this.val = val ;
        }

        @Override
        public String toString() {
            return "IndexedElement{" +
                    "idx=" + idx +
                    ", val=" + val +
                    '}';
        }
    }
    public static <T> ArrayList<IndexedElement<T>> getIndexedArray(ArrayList<T> ip){
        ArrayList<IndexedElement<T>> op = new ArrayList<>() ;
        for(int i = 0 ; i < ip.size() ; i++){
            op.add(new IndexedElement<>(i, ip.get(i))) ;
        }
        return op ;
    }
}

class IO{
    private BufferedReader br = null ;

    public IO(){
        this.br = new BufferedReader(new InputStreamReader(System.in)) ;
    }

    public ArrayList<Integer> getIntegerArray(int n)throws IOException{
        ArrayList<String> strings = this.getStringArray(n) ;
        return new ArrayList<>(strings.stream().map(Integer::parseInt).collect(Collectors.toList())) ;
    }

    public ArrayList<Long> getLongArray(int n)throws IOException{
        ArrayList<String> strings = this.getStringArray(n) ;
        return new ArrayList<>(strings.stream().map(Long::parseLong).collect(Collectors.toList())) ;
    }

    public ArrayList<Double> getDoubleArray(int n)throws IOException{
        ArrayList<String> strings = this.getStringArray(n) ;
        return new ArrayList<>(strings.stream().map(Double::parseDouble).collect(Collectors.toList())) ;
    }

    public ArrayList<String> getStringArray(int n)throws IOException{
        ArrayList<String> arr = new ArrayList<>() ;
        StringTokenizer st = new StringTokenizer(br.readLine()) ;

        while(st.hasMoreTokens()){
            arr.add(st.nextToken()) ;
        }

        return arr ;
    }

    static class Pair<T>{
        T a, b ;
        public Pair(T a, T b){
            this.a = a ;
            this.b = b ;
        }

        @Override
        public String toString() {
            return "Pair{" +
                    "a=" + a +
                    ", b=" + b +
                    '}';
        }
    }
    public ArrayList<Pair<Integer>> getIntegerPairArray(int n)throws IOException{
        ArrayList<Pair<Integer>> pairs = new ArrayList<>() ;
        for(int i = 0 ; i < n ; i++){
            StringTokenizer st = new StringTokenizer(br.readLine()) ;
            pairs.add(new Pair<>(Integer.parseInt(st.nextToken()), Integer.parseInt(st.nextToken()))) ;
        }
        return pairs ;
    }
}