Problem:
Score : 200 points

Problem Statement

Snuke loves working out. He is now exercising N times.

Before he starts exercising, his power is 1. After he exercises for the i-th time, his power gets multiplied by i.

Find Snuke's power after he exercises N times. Since the answer can be extremely large, print the answer modulo 10^{9}+7.

Constraints

1 ≤ N ≤ 10^{5}

Input

The input is given from Standard Input in the following format:

N

Output

Print the answer modulo 10^{9}+7.

Sample Input 1

3

Sample Output 1

6

After Snuke exercises for the first time, his power gets multiplied by 1 and becomes 1.

After Snuke exercises for the second time, his power gets multiplied by 2 and becomes 2.

After Snuke exercises for the third time, his power gets multiplied by 3 and becomes 6.

Sample Input 2

10

Sample Output 2

3628800

Sample Input 3

100000

Sample Output 3

457992974

Print the answer modulo 10^{9}+7.

Solution in C (GCC 5.4.1) (judge verdict: Accepted)

/*

import "core"
import "procon"

fn main() {
  n := read_int()
  power := int(1)
  for i in range(1, n) {
    power = (power * i) % (1000000000 + 7)
  }
  println(power)
}

main()

*/

#include "stdbool.h"
#include "stdint.h"
#include "math.h"
#include "stdio.h"
#include "string.h"
#include "inttypes.h"


struct core_string_String {
char* p;
int64_t len;
};
struct Array1024_core_prelude_Char { char data[1024]; };



bool core_prelude_true;
bool core_prelude_false;
bool core_definitions_is_windows;
bool core_definitions_is_compiletime;
bool core_definitions_is_runtime;
bool core_definitions_is_jscodegen;
float core_math_M_PI;
void* core_pointer_nullGG_() {
void* core_pointer_tmpid27 = ((void*)(0));
return core_pointer_tmpid27;
}
void* core_pointer_null;
char* core_pointer_plusexclGcore_prelude_CharG_core_pointer_Ptr_core_prelude_Char_core_prelude_Int(char* core_pointer_p, int64_t core_pointer_i) {
return ((char*)((((int64_t)(core_pointer_p)) + core_pointer_i)));
}
char core_string_getGG_core_prelude_CString_core_prelude_Int(char* core_string_cs, int64_t core_string_i) {
char core_string_tmpid28 = (*(core_pointer_plusexclGcore_prelude_CharG_core_pointer_Ptr_core_prelude_Char_core_prelude_Int(((char*)(core_string_cs)), core_string_i)));
return core_string_tmpid28;
}
char core_string_charGG_core_prelude_Int(int64_t core_string_c) {
char core_string_tmpid30 = ((char)(core_string_c));
return core_string_tmpid30;
}
char core_string_cr;
char core_string_lf;
int64_t procon_read_intGG_() {
int64_t procon_ret;
scanf("%" PRId64, &procon_ret);
int64_t procon_tmpid46 = procon_ret;
return procon_tmpid46;
}
bool procon_is_debug;
void b_mainGG_() {
int64_t b_n = procon_read_intGG_();
int64_t b_power = 1;
{
int64_t b_i = 1;
while ((b_i <= b_n)) {
b_power = (((b_power * b_i)) % ((1000000000 + 7)));
;
(b_i += 1);
};

}
;
;
;
printf("%lld", b_power);
;
;
printf("%s", "\n");
;
;
;
}

void flori_main() {
core_prelude_true = 1;
core_prelude_false = 0;
core_definitions_is_windows = 
#ifdef _WIN32
#define is_windows true
#elif _WIN64
#define is_windows true
#else
#define is_windows false
#endif
  is_windows;
core_definitions_is_compiletime = 
#ifdef FLORI_COMPILETIME
#define is_compiletime true
#else
#define is_compiletime false
#endif
  is_compiletime;
core_definitions_is_runtime = !(core_definitions_is_compiletime);
core_definitions_is_jscodegen = 
#ifdef FLORI_JSCODEGEN
#define is_jscodegen true
#else
#define is_jscodegen false
#endif
  is_jscodegen;
core_math_M_PI = M_PI;
core_pointer_null = core_pointer_nullGG_();
core_string_cr = core_string_charGG_core_prelude_Int(13);
core_string_lf = core_string_charGG_core_prelude_Int(10);
procon_is_debug = core_prelude_true;
b_mainGG_();
}
int main(int argc, char** argv) { flori_main(); }