#include <bits/stdc++.h>
const int64_t inf = 1e12;
using namespace std;
template <typename A, typename B>
ostream &operator<<(ostream &os, const pair<A, B> &p) {
  return os << '(' << p.first << ", " << p.second << ')';
}
template <typename T_container, typename T = typename enable_if<
                                    !is_same<T_container, string>::value,
                                    typename T_container::value_type>::type>
ostream &operator<<(ostream &os, const T_container &v) {
  os << '{';
  string sep;
  for (const T &x : v) os << sep << x, sep = ", ";
  return os << '}';
}
void dbg_out() { cerr << endl; }
template <typename Head, typename... Tail>
void dbg_out(Head H, Tail... T) {
  cerr << ' ' << H;
  dbg_out(T...);
}
inline void run_case() {
  int b, g, n;
  cin >> b >> g >> n;
  if (b >= n && g >= n) {
    cout << n + 1 << '\n';
    return;
  } else if (b + g == n) {
    cout << 1 << '\n';
    return;
  } else {
    cout << min(g, n) - n + min(b, n) + 1;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) run_case();
}
