#include <bits/stdc++.h>
using namespace std;
int main() {
  int boy, girl, n;
  cin >> boy >> girl >> n;
  long long ans = 0;
  for (int i = 0; i < n + 1; i++) {
    int b = i;
    int r = n - i;
    if (b <= boy && r <= girl) ans++;
  }
  cout << ans << endl;
  return 0;
}
