#include int main() { int x, y, d; scanf("%d %d %d", &x, &y, &d); int tx = (tx = d - x) > 0 ? tx : 0; int ty = (ty = d - y) > 0 ? ty : 0; int ans = (ans = d + 1 - (tx + ty)) > 0 ? ans : 0; printf("%d\n", ans); return 0; }