/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static double p(int x)
{
double r = 1.0;
for (int i = 2; i <= x; i++) r *= i;
return r;
}
{
// your code goes here
Scanner s
= new Scanner
(System.
in); int n = s.nextInt();
if (n > 50 || n < 0)
{
}
else
{
double d = 0;
for (int i = 1; i <= n; i++)
d += p(i);
System.
out.
println("结果=" + d
); }
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgZG91YmxlIHAoaW50IHgpCgl7CgkJZG91YmxlIHIgPSAxLjA7CgkJZm9yIChpbnQgaSA9IDI7IGkgPD0geDsgaSsrKSByICo9IGk7CgkJcmV0dXJuIHI7Cgl9CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCgkJU2Nhbm5lciBzID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKCQlpbnQgbiA9IHMubmV4dEludCgpOwoJCWlmIChuID4gNTAgfHwgbiA8IDApCgkJewoJCQlTeXN0ZW0ub3V0LnByaW50bG4oIuS4jeWcqOiMg+WbtO+8gSIpOwoJCX0KCQllbHNlCgkJewoJCQlkb3VibGUgZCA9IDA7CgkJCWZvciAoaW50IGkgPSAxOyBpIDw9IG47IGkrKykKCQkJCWQgKz0gcChpKTsKCQkJU3lzdGVtLm91dC5wcmludGxuKCLnu5Pmnpw9IiArIGQpOwoJCX0KCX0KfQ==