//VARIANTA CU SECVENTA DE REPETITIE
#include <iostream>
using namespace std;
int main()
{
float ma = 0,N;
int k=0;
cin>>N;
for(int i=1;;i++)
{
if(i%3 == 0)
{
ma = ma + float(i)/N;
k++;
}
if(k==N)
{
break;
}
}
cout<<ma;
}
//VARIANTA FARA:
#include <iostream>
using namespace std;
int main()
{
float ma = 0;
float N;
cin>>N;
ma = (3*N*(N+1)/2)/N;
cout<<ma;
}