#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int b, g, n;
  cin >> b >> g;
  cin >> n;
  int cont = 0;
  for (int i = 0; i < (int)(n + 1); i++) {
    int p1 = i, p2 = n - i;
    if (p1 <= b && p2 <= g) {
      cont++;
    }
  }
  cout << cont << '\n';
  return 0;
}
