N,M=map(int,input().split()) v=1 for i in range(N|M): v*=i+1 print(v)