#include <bits/stdc++.h>
using namespace std;
int main() {
  int b, g, n;
  cin >> b >> g >> n;
  if (b >= n && g >= n)
    cout << n + 1;
  else
    cout << min(b, g) - (n - min(max(b, g), n)) + 1;
  return 0;
}
