#include <bits/stdc++.h>
using namespace std;
inline void prnt(bool ok) { cout << (ok ? "YES" : "NO"); }
const int ppr = 257;
const long long INF = 2e18;
const int inf = 2e9;
const int mod = 1e9 + 7;
const int N = 1e6 + 123;
const long double pi = 3.141592653589793238462643;
const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};
int b, g, n, ans;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> b >> g >> n;
  for (int i = 0; i <= n; i++) {
    int x = i, y = n - i;
    if (x <= b && y <= g) ans++;
  }
  cout << ans;
  return 0;
}
