#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const long long INF = 1001001001;
const long long MOD = 1000000007;
const double EPS = 1e-10;

long double riemann_zeta(ll i){
    long double res=0;
    for(ll j=1;;j++){
        long double t=1.0/pow(j,i);
        if(t<1e-15)break;
        res+=t;
    }
    return res;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    ll x;
    cin>>x;
    if(x==2){
        cout<<1e6-1<<endl;
        return 0;
    }
    long double sum=0;
    for(ll i=x;;i++){
        long double t=riemann_zeta(i)-1.0;
        if(t<1e-15)break;
        sum+=t;
    }
    cout<<fixed<<setprecision(12)<<sum<<endl;
    ll ans=sum*1e6;
    cout<<ans<<endl;
}