#include<stdio.h>
int main()
{
int a,b,c,k;
int m,n;
scanf("%d %d %d",&a,&b,&c);
if(c==0&&b!=0&&a!=0){
k=b;
}else if(b==0&&c!=0&&a!=0){
if(a<c){
k=a+1;
} else if(a>=c){
k=c;
}
}else if(a==0&&b!=0&&c!=0){
if(b>=c){
k=b+c;
}else if(b<c){
m=c-1-b;
n=c-m;
k=b+n;
}
}else if(a==0&&b==0&&c!=0){
k=1;
}else if(a==0&&c==0&&b!=0){
k=b;
}else if(b==0&&c==0&&a!=0){
k=0;
}
else{
if((a+b)<=c)
{
m=a+b;
n=c-m;
k=m+n+1;
}
else{
k=b+c;
}
}
printf("%d\n",k);
}