#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 9;
int b, g, n;
int main() {
  scanf("%d%d%d", &b, &g, &n);
  int cou = 0;
  for (int i = 0; i <= b; i++) {
    if (n - i >= 0 && n - i <= g) {
      cou++;
    }
  }
  printf("%d", cou);
}
