#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 7;
const int MOD = 1e9 + 7;
const int INF = 1e9 + 7;
const long long MINF = 1e18 + 7;
const int EPS = 1e-6;
const int dx[] = {0, 0, 1, -1, -1, -1, 1, 1};
const int dy[] = {1, -1, 0, 0, -1, 1, -1, 1};
const double pi = acos(-1.0);
long long a[MAXN], b[MAXN];
vector<int> g[MAXN], v;
bool used[MAXN];
long long n, m, k, cnt = 0, sum = 0, ans = 0, mx = 0, mn = INF;
bool y = 0;
void freopen() {
  freopen("A.in", "r", stdin);
  freopen("A.out", "w", stdout);
}
void solve() {
  long long b, g;
  cin >> b >> g >> n;
  long long n1 = n, n2 = 0;
  for (int i = 0; i <= n; i++) {
    if (b >= i && g >= n - i) {
      cnt++;
    }
  }
  cout << cnt;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  long long T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
