x,y,d,c,b;main(a){scanf("%d%d%d",&x,&y,&d);for(a=d;b<=d;a--,b++)c+=a<=x&&b<=y;printf("%d",c);}