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