#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.precision(17);
  int n, b, g;
  cin >> b >> g >> n;
  int a = 0;
  for (int i = 0; i <= min(b, n); i++) {
    if (n - i <= g) a++;
  }
  cout << a << endl;
  return 0;
}
