#include using namespace std; using namespace chrono; #if __has_include() #include using namespace atcoder; #endif int main() { int64_t x, y, z; cin >> x >> y >> z; int64_t ans = z; if (x <= z) { ans--; } if (y <= z) { ans--; } cout << ans << endl; return 0; }