#include using namespace std; /* (0,0),(x,0),(0,y),(x,y) -> マンハッタン距離 → |x1-x2|+|y1-y2| = d */ int x,y,d; bool RectCheck(int px,int py){ if(px > x || py > y) return false; else return true; } int main(){ cin >> x >> y >> d; int ans = 0; for(int X = 0; X <= d; X++){ if(RectCheck(X,d-X) ==true){ ans++; } } cout << ans << endl; return 0; }