#include <iostream>
#include <math.h>
int main() {
double i, f = 1, p = 1;
int n;
scanf("%d",&n);
for(int i = 1; i <= n; i++)
{
f = f * i;
p *= ( 1 / f + 2);
}
printf("%f ", p);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWF0aC5oPgogCmludCBtYWluKCkgewoJZG91YmxlICBpLCBmID0gMSwgcCA9IDE7CglpbnQgbjsKCXNjYW5mKCIlZCIsJm4pOwoJZm9yKGludCBpID0gMTsgaSA8PSBuOyBpKyspCgl7IAoJCWYgPSBmICogaTsKCQlwICo9ICggMSAvIGYgKyAyKTsKCX0KICAgIHByaW50ZigiJWYgIiwgcCk7CglyZXR1cm4gMDsKfQ==