#include <bits/stdc++.h>
using namespace std;
int main() {
  long long B, G, N, output;
  cin >> B;
  cin >> G;
  cin >> N;
  output = N + 1 - (B < N ? N - B : 0) - (G < N ? N - G : 0);
  cout << output << endl;
  return 0;
}
