#include <bits/stdc++.h>
using namespace std;
vector<long> adj[100005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m, k, j, l = 0, p = 0, q = 0, r = 0, i, flag = 0, t, d;
  long long b, g;
  cin >> b >> g >> n;
  if (b + g == n) {
    cout << 1;
    return 0;
  }
  if (n == 1) {
    if (b == 0 || g == 0) {
      cout << 1;
      return 0;
    } else {
      cout << 2;
      return 0;
    }
  }
  t = (n * (n - 1)) / 2;
  for (long long i = 0; i < t + 1; i++) {
    if (i <= b && n - i <= g && n - i >= 0) {
      p++;
    }
  }
  cout << p;
  return 0;
}
