#include using namespace std; using lint = long long; template using V = vector; template using VV = V< V >; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); lint x, y, z; cin >> x >> y >> z; lint res = z; res -= x <= z; res -= y <= z; cout << res << '\n'; }