a,b,c=map(int,input().split()) x,y=0,0 cnt=0 for x in range(c): for y in range(c): if xa+by==c: cnt+=1 print(cnt)