#include<stdio.h>
int main()
{
    int N,o,i;
    double rate,j;
    printf("请输入:\n");
    scanf("%d",&N);
    o=0;
    j=0;
    if(N>=1&&N<=100) {
        for(i=1; i<=N; i++) {
            if((i%2)==1) j=j+1;
            else o=o+1;
        }
      
    }
    rate=j/N;

    printf("%.10f",rate);
}