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