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