#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, g, b, c = 0, boy[302];
  cin >> b >> g >> n;
  memset(boy, 0, sizeof boy);
  for (int i = 0; i <= b; i++) {
    for (int j = 0; j <= g; j++) {
      if (i + j == n) boy[i] = 1;
    }
  }
  for (int i = 0; i <= b; i++) {
    if (boy[i] == 1) c++;
  }
  cout << c << "\n";
  return 0;
}
