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