#include <bits/stdc++.h>
using namespace std;
ifstream f1("DQAB.INP");
ofstream f2("DQAB.OUT");
double a(double n)
{if (n==1){return 1;}
   else return 1/n+a(n-1);}


int main()
{

   long double n;
   long double i,gt=1,b=1;
   f1>>n;
   for (i=1;i<=n;i++)
   { gt=gt*2*i;
     b=b+1/gt;
   }
   f2<<setprecision(3)<<fixed<<a(n)<<endl<<b;
   return 0;
}
