#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long b, g, n;
  cin >> b >> g >> n;
  long long ans = 0;
  for (long long i = 0; i <= b; ++i) {
    if (((n - i) <= g) && ((n - i) >= 0)) {
      ++ans;
    }
  }
  cout << ans << "\n";
}
