#include <bits/stdc++.h>
using namespace std;
int main() {
  long long b, deocoai, g, n, p, q, i, a[300], t, tong, z, a1, a2, k2, k1;
  cin >> b >> g >> n;
  if (min(b, g) >= n) {
    cout << n + 1;
    return 0;
  }
  if (max(b, g) >= n && min(b, g) <= n) {
    cout << min(b, g) + 1;
    return 0;
  }
  cout << b + g - n + 1;
}
