#include <bits/stdc++.h>
using namespace std;
const int M = 1000000007, BIG = 0x3f3f3f3f;
int b, g, n;
int Process() {
  int ans = 0;
  int mn_b = min(b, n), mn_g = min(g, n);
  for (int i = 0; i <= mn_b; i++) {
    const int j = n - i;
    if (j <= mn_g) ans++;
  }
  return ans;
}
void Output() { cout << Process() << "\n"; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  while (cin >> b) {
    cin >> g >> n;
    Output();
  }
  return 0;
}
