#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main(){
srand(time(NULL));
// seeding the PRNG with current time
int trial;
cin >> trial;
double total = 0.0;
for(int i = 0; i < trial; i++){
int roll = rand() % 6 + 1;
if(roll <= 4)
total -= roll * 1.5;
else
total += roll;
}
total /= trial;
cout << total << endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0ZGxpYj4KI2luY2x1ZGUgPGN0aW1lPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKXsKICBzcmFuZCh0aW1lKE5VTEwpKTsgCiAgLy8gc2VlZGluZyB0aGUgUFJORyB3aXRoIGN1cnJlbnQgdGltZQogIAogIGludCB0cmlhbDsKICBjaW4gPj4gdHJpYWw7CiAgCiAgZG91YmxlIHRvdGFsID0gMC4wOwogIGZvcihpbnQgaSA9IDA7IGkgPCB0cmlhbDsgaSsrKXsKICAJaW50IHJvbGwgPSByYW5kKCkgJSA2ICsgMTsKICAgIAogICAgaWYocm9sbCA8PSA0KQogICAgCXRvdGFsIC09IHJvbGwgKiAxLjU7CiAgIAllbHNlCiAgICAJdG90YWwgKz0gcm9sbDsKICB9CiAgCiAgdG90YWwgLz0gdHJpYWw7CiAgCiAgY291dCA8PCB0b3RhbCA8PCBlbmRsOwp9