#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - 48;
    ch = getchar();
  }
  return x * f;
}
signed main() {
  long long b = read(), g = read(), n = read(), ans = 0;
  ans = n + 1;
  if (n > b) ans -= (n - b);
  if (n > g) ans -= (n - g);
  printf("%d", ans);
  return 0;
}
