#include <bits/stdc++.h>
using namespace std;
int x8[] = {1, 1, 1, 0, 0, -1, -1, -1};
int y8[] = {1, 0, -1, 1, -1, -1, 0, -1};
int x4[] = {1, -1, 0, 0};
int y4[] = {0, 0, 1, -1};
long long int mod = 1e9 + 7;
void getac() {
  long long int ans = 0;
  long long int b, g, n;
  cin >> b >> g >> n;
  for (long long int i = 0; i <= n; i++) {
    long long int x = i;
    long long int y = n - i;
    if (x <= b && y <= g) {
      ans++;
    }
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t = 1;
  while (t--) {
    getac();
  }
  cerr << "Time elapsed :" << clock() * 1000.0 / CLOCKS_PER_SEC << " ms"
       << '\n';
  return 0;
}
