#include<stdio.h> int main() { int n; scanf("%d",&n); double sum=0.0,sign=1.0; for(int i=1;i<=n;i++){ sum+=sign/(1+3*(i-1)); sign=-sign; } printf("%.3f\n",sum); return 0; }