#include using namespace std; int main() { int p, q; cin >> p >> q; cout << min(p,q) << endl; }