a,b=gets.split(" ").map{|e| e.to_i} ans=1 1.upto(a|b){|i| ans*=i} puts ans