#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
int a[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, b, g;
  cin >> b >> g >> n;
  int minB = max(n - g, 0), maxB = min(b, n);
  int minG = max(n - b, 0), maxG = min(g, n);
  int ans = 0;
  for (int i = 0; (i) < (n + 1); ++i) {
    if (i >= minB && i <= maxB && (n - i) >= minG && (n - i) <= maxG) {
      ans++;
    }
  }
  cout << ans << '\n';
  return 0;
}
