#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
int mulmd(long long a, long long b) {
  long long ret = (a * b) % 1000000007;
  return (int)ret;
}
inline int power(long long x, long long y, int p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = mulmd(res, x);
    y = y >> 1;
    x = mulmd(x, x);
  }
  return (int)res;
}
int submd(long long a, long long b) {
  long long ret = a - b;
  if (ret < 0) {
    ret += 1000000007;
  }
  return (int)ret;
}
int addmd(long long a, long long b) {
  long long ret = (a + b) % 1000000007;
  return (int)ret;
}
int phi(int n) {
  int result = n;
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      while (n % i == 0) {
        n /= i;
      }
      result -= result / i;
    }
  }
  if (n > 1) result -= result / n;
  return result;
}
const int N = 1e5 + 5;
int arr[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int b, g, n;
  cin >> b >> g >> n;
  if (b < g) {
    int cnt = 0;
    for (int i = b; i >= 0; i--) {
      if (n - i <= g && n - i >= 0) cnt++;
    }
    cout << cnt << "\n";
  } else {
    int cnt = 0;
    for (int i = g; i >= 0; i--) {
      if (n - i <= b && n - i >= 0) cnt++;
    }
    cout << cnt << "\n";
  }
}
