#include #include #include #include #include #include #include #include #include #include #include const int MOD = 1e9 + 7; const int iINF = 1000000000; const long long int llINF = 1000000000000000000; #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long int; using P = pair; using edge = struct { int to; int cost; }; const ll mod = 1000000000000; ll fanc(int i) { return i ? (i * fanc(i - 1)) % mod : 1; } int main() { int N; cin >> N; string ans = to_string(fanc(N)); while(ans.length() != 12 && 14 < N) ans = '0' + ans; if (N < 50) cout << ans << endl; else printf("000000000000\n"); return 0; }