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