#include #define Int int64_t using namespace std; int main() { Int x, y, z; cin >> x >> y >> z; if (x <= z) { --z; } if (y <= z) { --z; } cout << z << endl; return 0; }