#include <bits/stdc++.h>
using namespace std;
int main() {
  int b, g, n;
  cin >> b >> g >> n;
  int p = min(b, n);
  int q = min(g, n);
  int count = 0;
  for (int i = 0; i <= p; i++) {
    for (int j = 0; j <= q; j++) {
      if (i + j == n) {
        count++;
      }
    }
  }
  cout << count << "\n";
  return 0;
}
