#include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define INF (1 << 30) #define INFLL (1LL << 60) int main() { int mx,my,n; cin >> mx >> my >> n; int p = min(n,mx) + min(n,my) - n; p++; if(p >= 0) cout << p << endl; else cout << 0 << endl; return 0; }