#include #include using namespace std; int main(){ long long a, b, c; cin >> a >> b >> c; if ( a <= c ) c--; if ( b <= c ) c--; cout << c << endl; return 0; }