#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  unsigned long long a, b, c, count = 0;
  cin >> a >> b >> c;
  for (unsigned long long i = 0; i <= a; i++) {
    for (unsigned long long j = 0; j <= b; j++) {
      if (i + j == c) count++;
    }
  }
  cout << count << endl;
}
