#include <bits/stdc++.h>
using namespace std;
int main() {
  int b, g, n;
  cin >> b >> g >> n;
  int temp = min(b, min(g, n));
  int cnt = 0;
  int s = max(b, g);
  for (int i = temp; i >= 0; --i) {
    if (n - i <= s)
      ++cnt;
    else
      break;
  }
  cout << cnt;
}
