#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
long long mod = 1e9 + 7;
long long fmod(long long b, long long exp) {
  long long res = 1;
  while (exp) {
    if (exp & 1ll) res = (res * b) % mod;
    b = (b * b) % mod;
    exp /= 2ll;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int m, i, j, k, x, q;
  int t = 1;
  long long n, b, g;
  cin >> b >> g >> n;
  long long mxb = min(n, b);
  long long mxg = min(n, g);
  long long mnb = max(0ll, min(b, n - mxg));
  long long mng = max(0ll, min(g, n - mxb));
  long long ind1 = min(mng, n - mxb);
  long long ind2 = max(mxg, n - mnb);
  cout << max(1ll, ind2 - ind1 + 1) << "\n";
  return 0;
}
