#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int answer = 0;
  int b, g;
  cin >> b >> g;
  int n;
  cin >> n;
  for (int i = 0; i <= b; i++) {
    for (int j = 0; j <= g; j++) {
      if (i + j == n) answer++;
    }
  }
  cout << answer << '\n';
}
