#include <bits/stdc++.h>
using namespace std;
long long a, b, c, n, man, mix, x, y, z, k, ans, ans1, l, r, l1, r1, d[1000000];
string s, s1, s2, s3;
vector<long long> v, v1;
map<long long, long long> mp, mp1, mp2;
bool o, bo;
stack<long long> st;
char ch;
int main() {
  cin >> a >> b >> c;
  if (c <= max(a, b))
    cout << min(min(a, c), b) + 1;
  else
    cout << a + b - c + 1;
}
