#include <bits/stdc++.h>

using namespace std;

ifstream fi ("dqab.inp");
ofstream fo ("dqab.out");

double A (double n){
 if (n<2){return 1;}
 else {
    return 1/n+A(n-1);
 }
}

double B(double n){
 if (n<1){return 1;}
 else {
    double sum=1;
    for (int i=2;i<=n*2;i+=2){sum=sum*i;}
    return 1/sum+B(n-1);
 }
}

int main(){
 double n;
 fi>>n;
 fo<<fixed<<setprecision(3)<<A(n)<<endl<<B(n);
}
