#include <bits/stdc++.h>
using namespace std;
int b, g, n, ans;
int32_t main() {
  ios_base ::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  cin >> b >> g >> n;
  if (b < n) ans += n - b;
  if (g < n) ans += n - g;
  cout << n + 1 - ans;
}
