#!/usr/bin/env python3

p, q = input().split()
p = int(p)
q = int(q)
print(min(p, q))