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