#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
const int N = 1e5 + 36;
const int INF = 1e9 + 7;
int a[N];
signed main() {
  ios_base::sync_with_stdio(0);
  int b, g, n;
  cin >> b >> g >> n;
  int ans = 0;
  for (int i(0); i <= min(b, n); ++i) {
    if (i + g >= n) {
      ++ans;
    }
  }
  cout << ans << endl;
  return 0;
}
