#include #include #include #include #include using namespace std; int main() { int x, y, d; cin >> x >> y >> d; int ans = 0; int xx, yy; for (int i = 0; i <= d; i++) { xx = d - i; yy = i; if (0 <= xx && xx <= x && 0 <= yy && yy <= y) { ans++; } } cout << ans << endl; return 0; }