# -*- coding: utf-8 -*- a,b,d = map(int, input().split()) ans = d + 1 ans -= (max(0, d-a) + max(0, d-b)) print(max(0,ans))