#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int b, g, n;
  cin >> b >> g >> n;
  long long int x = min(n, min(b, g));
  if (x == n) {
    cout << x + 1 << endl;
    return 0;
  }
  if (x == g) {
    if (n >= b)
      cout << (x + 1) - (n - b) << endl;
    else
      cout << x + 1 << endl;
  } else {
    if (n >= g)
      cout << (x + 1) - (n - g) << endl;
    else
      cout << x + 1 << endl;
  }
  return 0;
}
