#include #include #include #include #define ll long long using namespace std; int main(){ int x,y,d; cin>>x>>y>>d; int ans=d+1; if(d>x) ans-=(d-x); if(d>y) ans-=(d-y); ans=max(ans,0); cout<