#include <cstdio>

int kaijo(int n);
unsigned int ans;

int main(void)
{
    int n;
    scanf("%d", &n);
    
    kaijo(n);
    printf("%u\n", ans);
    
}

int kaijo(int n)
{
    if (n == 1) return 1;
    
    ans = n * kaijo(n - 1);
    
    return (ans);
}