#include <iostream> #include <cstdio> #include <cstring> #include <sstream> #include <algorithm> #include <math.h> #include <map> #include<functional> #include <iomanip> #include <vector> #include <queue> #include <set> #include <typeinfo> #define PI 3.14159265359 #define INF 99999999; #define rep(i, n) for(int i=0; i<n; i++) #define REP(n) rep(i, n) #define EPS 1e-10 typedef long long ll; using namespace std; /* class Target { public: vector <string> draw(int n) { } }; */ int main() { int x, y, d; int xx, yy, num = 0; cin >> x >> y >> d; for (xx=d; xx>=0; xx--) { yy = d - xx; if (xx <= x && yy <= y) num++; } cout << num << endl; return 0; }