#include <bits/stdc++.h>
using namespace std;
long long n, a, b, i, j, ans, q, u, v;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> a >> b >> n;
  if (min(a, b) >= n) {
    cout << n + 1 << endl;
    return 0;
  }
  if (a + b == n) {
    cout << 1 << endl;
    return 0;
  }
  long long p = min(max(a, b), n);
  cout << min(a, b) + 1 - n + p << endl;
  return 0;
}
