#include <bits/stdc++.h>
using namespace std;
int main() {
  int b, g, n, j, coun = 0;
  cin >> b >> g >> n;
  for (int i = 0; i <= n; i++) {
    j = n - i;
    if (b >= i && g >= j) coun++;
  }
  cout << coun << endl;
  return 0;
}
