#include void solve() { int x, y, d; std::cin >> x >> y >> d; std::cout << std::max(0, d + 1 - std::max(d - x, 0) - std::max(d - y, 0)) << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }