#include <bits/stdc++.h>
using namespace std;
int main() {
  int b, g, n;
  cin >> b >> g >> n;
  if (b < g) swap(b, g);
  int t = 0;
  int ans = 0;
  while (1) {
    if (t > b || t > n) break;
    if ((n - t) <= g) {
      ans++;
    }
    t++;
  }
  cout << ans << endl;
  return 0;
}
