#include <bits/stdc++.h>
using namespace std;
int main() {
  int b, g, n;
  cin >> b;
  cin >> g;
  cin >> n;
  int trio[3] = {b, g, n};
  sort(trio, trio + 3);
  if (trio[0] == n) {
    cout << n + 1;
  } else {
    int calcus = n - trio[0];
    calcus = trio[1] - calcus;
    calcus++;
    cout << calcus;
  }
}
