#include <iostream>
#include <iomanip>
using namespace std;
int main() {
int k;
long double val = 0;
cin >> k;
for (int n = 1; n <= k; n++){
val += 1.0/((3*n - 2)*(3*n + 1));
}
cout << setprecision(15) <<val;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aW9tYW5pcD4gCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCWludCBrOwoJbG9uZyBkb3VibGUgdmFsID0gMDsKCWNpbiA+PiBrOwoJZm9yIChpbnQgbiA9IDE7IG4gPD0gazsgbisrKXsKCQl2YWwgKz0gMS4wLygoMypuIC0gMikqKDMqbiArIDEpKTsgCgl9Cgljb3V0IDw8IHNldHByZWNpc2lvbigxNSkgPDx2YWw7CglyZXR1cm4gMDsKfQ==