public class Main{
public static long factorial(int a){
if (a == 0)
return 1;
else
return a*factorial(a - 1);
}
java.
util.
Scanner i
= new java.
util.
Scanner(System.
in); int a;
int n = i.nextInt();
System.
out.
print(factorial
(n
)); }
}
cHVibGljIGNsYXNzIE1haW57CglwdWJsaWMgc3RhdGljIGxvbmcgZmFjdG9yaWFsKGludCBhKXsKCQlpZiAoYSA9PSAwKQogICAgICAgIAlyZXR1cm4gMTsKICAgICAgICBlbHNlCiAgICAgICAgCXJldHVybiBhKmZhY3RvcmlhbChhIC0gMSk7CgkJfQogCglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24gCXsKCQlqYXZhLnV0aWwuU2Nhbm5lciBpID0gbmV3IGphdmEudXRpbC5TY2FubmVyKFN5c3RlbS5pbik7CgkJaW50IGE7CgkJaW50IG4gPSBpLm5leHRJbnQoKTsKICAgICAgICBTeXN0ZW0ub3V0LnByaW50KGZhY3RvcmlhbChuKSk7Cgl9Cn0K