#include <iostream>
using namespace std;
int main() {
int n;
long factorial = 1;
cin >> n;
for(int i = 1; i <= n; i++) {
factorial *= i;
}
cout << factorial;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbjsKCWxvbmcgZmFjdG9yaWFsID0gMTsKCWNpbiA+PiBuOwoJZm9yKGludCBpID0gMTsgaSA8PSBuOyBpKyspIHsKCQlmYWN0b3JpYWwgKj0gaTsKCX0KCWNvdXQgPDwgZmFjdG9yaWFsOwoKfQ==