#include <bits/stdc++.h>
using namespace std;
const int N = 1;
int main() {
  long long int n, g, b, ans = 0;
  cin >> b >> g >> n;
  for (int i = 0; i <= b && n >= i; i++) {
    if (n - i <= g) ans++;
  }
  cout << ans;
}
