#coding=UTF-8 mojir=input() hyo=mojir.split(' ') A=int(hyo[0]) B=int(hyo[1]) if {A,B}=={4,7}: print(4) else: print(max(A,B))