#include <bits/stdc++.h>
using namespace std;
int main() {
  int b, g, n, sol = 0;
  scanf("%d%d%d", &b, &g, &n);
  for (int i = 0; i <= n; i++) {
    int nrb = i;
    int nrg = n - i;
    if (nrb <= b && nrg <= g) sol++;
  }
  printf("%d", sol);
  return 0;
}
