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 Solve{
    static final int MOD=1000000007;
   
    public static void main (String[] args) throws Exception{
         BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
          PrintWriter out=new  PrintWriter(System.out,true);
        
       
          int t=1;

        while(t-->0)
          solve(in,out);
       
    }

    private static void solve(BufferedReader in,PrintWriter out)throws Exception {
       String[] nab=in.readLine().trim().split(" ");
        int a=Integer.parseInt(nab[1]);
        int n=Integer.parseInt(nab[0]);
        int b=Integer.parseInt(nab[2]);

        int count=0;
        for(int i=a;i<n;i++){
            if((n-i-1)<=b) count++;
        }
        out.println(count);
      }

      private static long power(long n,long p,long m){
        
        long result=1;

        while(p>0){
            if(p%2==1) result=(result*n)%m;
            n=(n*n)%m;
            p>>=1;
        }
        return result;
    }

   private int gcd(int a, int b) {
        if(b==0)
            return a;
        else
            return gcd(b, a % b);
    }


    private static void sieve(int n){
         boolean[] prime=new boolean[n];
         for(int i=0;i<n;i++)
             prime[i]=true;
         for(int i=2;i*i<n;i++){
            if(prime[i]){
                for(int j=i*i;j<n;j+=i)
                 prime[j]=false;
            }
        }
         for ( int i = 2; i < prime.length; i++) {
             if(prime[i])
              System.out.print(i+" ");
         }  
         
    
    }

    private static void segmentedSieve(int low,int high){

        int sqrt=(int) Math.sqrt(high);
        int[] prime=new int[sqrt+1];
        boolean[] arr=new boolean[sqrt+1];

        for(int i=0;i<=sqrt;i++)
            arr[i]=true;

        int k=0;
        for(int i=2;i<=sqrt;i++){           //generate all prime numbers till square root of high
            if(arr[i]){
                prime[k]=i;
                
                k++;
                for (int j = i*i; j <= sqrt; j+=i) 
                    arr[j]=false;
        
                
             }
        }
        // System.out.println(Arrays.toString(prime));

        int diff=high-low+1;          // arr size of required length 
        arr=new boolean[diff];
        for(int i=0;i<diff;i++)
             arr[i]=true;
        
        for(int i=0;i<k;i++){               // mark false to multiple of prime numbers in the range of low to high
            int div=(low/prime[i])*prime[i];        // It gives multiple of prime[i] nearest to low 
            if(div<low || div==prime[i])
               div+=prime[i];
            for(int j=div;j<=high;j+=prime[i]){
                 if(j!=prime[i])
               arr[j-low]=false;
            }
        }
        for(int i=0;i<diff;i++){                //print prime numbers in the given segment
            if(arr[i] && (i+low)!=1){
                System.out.print(i+low+" ");
            }
        }
        System.out.println();

    }

    class Pair implements Comparable<Pair>{
        int a;
        int b;
        public Pair(int a,int b){
            this.a=a;
            this.b=b;
        }
    
        @Override
        public int compareTo(Pair o) {
          if(this.a>o.a) return this.a-o.a;
          else if(this.a<o.a)
              return this.b-o.b;
          
          else  return 0;
         
        }
    }
}
