#include <bits/stdc++.h>
using namespace std;

int main() {
  int p, q;
  cin >> p >> q;
  cout << min(p,q) << endl;
}