# coding:utf-8 x, y, d = map(int, input().split()) ans = 0 for i in range(d+1): if i > x or d - i > y: continue ans += 1 print(ans)