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