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