x,y,d = map(int,input().split()) cnt = 0 for i in range(x+1): for j in range(y+1): if i+j == d: cnt += 1 print(cnt)