while 1: r=raw_input() a=1 for f in range(int(r.rstrip("!")),0,-r.count("!")):a*=f print a