trick,treat=map(int,input().split()) x=trick|treat y=1 for i in range(1,x+1): y*=i print(y)