#include <iostream>
using namespace std;

int main() {
    int a, b;
    cin>>a>>b;
	if (a<=2 and b<=5) 
	cout<<min(a,b);
    
    return 0;
}
