#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
int N;
int jishu;
double gailv;
cin>>N;
if(N%2==1)
{
	jishu=N/2+1;
}else
{
	jishu=N/2;
}
gailv=1.00000000000*jishu/N;
cout<<setiosflags(ios::fixed)<<setprecision(10);
cout<<gailv<<endl;

return 0;
}