#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T sqr(T x) {
  return x * x;
}
const double EPS = 1e-6;
const int INF = 0x3fffffff;
const long long LINF = INF * 1ll * INF;
const double PI = acos(-1.0);
int main() {
  int b, g, n;
  scanf("%d%d%d", &b, &g, &n);
  int ans = 0;
  for (int i = 0; i <= min(n, b); i++) {
    if (n - i <= g) ans++;
  }
  printf("%d\n", ans);
  return 0;
}
