import strutils let n = stdin.readLine().parseInt() if n >= 50.int: quit("0",0.int) const answers = [1.int,1.int,2.int,6.int,24.int,120.int,720.int,5040.int,40320.int,362880.int,3628800.int,39916800.int,479001600.int,6227020800.int,87178291200.int,307674368000.int,922789888000.int,687428096000.int,373705728000.int,100408832000.int,8176640000.int,171709440000.int,777607680000.int,884976640000.int,239439360000.int,985984000000.int,635584000000.int,160768000000.int,501504000000.int,543616000000.int,308480000000.int,562880000000.int,12160000000.int,401280000000.int,643520000000.int,523200000000.int,835200000000.int,902400000000.int,291200000000.int,356800000000.int,272000000000.int,152000000000.int,384000000000.int,512000000000.int,528000000000.int,760000000000.int,960000000000.int,120000000000.int,760000000000.int,240000000000.int] echo answers[n]