#include #include int main(){ int x, y, d; scanf("%d %d %d", &x, &y, &d); printf("%d\n", std::max(d+1 - (d>x)*(d-x) - (d>y)*(d-y), 0)); }