#!/usr/bin/env perl
use strict;
use warnings;

my $input = <STDIN>;
my @number = (1..$input);
my $sum= 1;

for my $i (@number){
    $sum *= $i;
}
print $sum;