#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t--) {
    int b, g, n;
    cin >> b >> g >> n;
    int cnt = 0;
    for (int i = 0; i <= n; i++) {
      int x = i, y = n - i;
      if (x <= b && y <= g) cnt++;
    }
    cout << cnt;
  }
}
