#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int b, r, n;
  cin >> b >> r >> n;
  int ans = n + 1;
  if (b < n) ans -= (n - b);
  cerr << "ans"
       << ": " << ans << endl;
  ;
  if (r < n) ans -= (n - r);
  cerr << "ans"
       << ": " << ans << endl;
  ;
  ans = ans < 0 ? 0 : ans;
  cerr << "ans"
       << ": " << ans << endl;
  ;
  cout << ans << endl;
  return 0;
}
