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.*;
public class Main
{
	public static void main(String[] args) 
	{
	    Scanner sc=new Scanner(System.in);
	    int i,m,j,t,f=1,n,r, k, l, c,x, d, p, nl,max=0,ans=1, min,np;
	    int a;
	    int b;
	   // long x;
	    n=sc.nextInt();
	    a=sc.nextInt();
	    b=sc.nextInt();
	   // x=sc.nextInt();
	    
	   //// int c0=0;
	   //// int c1=0;
	   //// long ans1=0l;
	   //// sc.nextLine();
	   // long ans=0l,a,b,c;
	   //a=new int[n];
	   //b=new int[n];
	   // StringBuffer s= new StringBuffer();
	   // s.append(sc.nextLine());
	   //// m=sc.nextInt();
	   // int sum=0;
	   // for(i=0;i<n;i++)
	   // {
	   //     a[i]=sc.nextInt();
	   //     b[i]=sc.nextInt();
	   // }
	   // for(i=0;i<n;i++)
	   // {
	   //     min=i;
	   //     for(j=i+1;j<n;j++)
	   //     {
	   //         if(a[min]>a[j])
	   //         min=j;
	   //     }
	   //     k=a[i];
	   //     a[i]=a[min];
	   //     a[min]=k;
	   //     k=b[i];
	   //     b[i]=b[min];
	   //     b[min]=k;
	   // }
	   // for(i=0;i<n-1;i++)
	   // {
	   //     if(a[i]<a[i+1]&&b[i]>b[i+1])
	   //     {ans=0;break;}
	   // }
	   // if(ans==0)
	   // System.out.println("Happy Alex");
	   // else
	   // System.out.println("Poor Alex");
	   n-=a;
	   System.out.println(Math.min(n,b+1));
	}
}
