#include <map>
#include <cstdio>
#include <vector>
#include <cstring>
#include <algorithm>
using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
const ll lim=1000000000LL*1000000000LL;

map<ll,pii> mp;

int n,m;
ll a[100],b[100];

int main()
{
	a[n=0]=b[m=0]=1;
	while(a[n]*3<=lim)
	{
		++n;
		a[n]=a[n-1]*3;
	}
	while(b[m]*5<=lim)
	{
		++m;
		b[m]=b[m-1]*5;
	}
	
	for(int i=1;i<=n;i++)
		for(int j=1;j<=m;j++)
			mp[a[i]+b[j]]=pii(i,j);
	
	ll x;
	scanf("%lld",&x);
	if(mp.find(x)!=mp.end())
		printf("%d %d",mp[x].first,mp[x].second);
	else
		printf("-1");
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e9+7;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);

    int n;
    cin >> n;
    double ans = 0;
    for(int i = 1; i < n; i++){
        ans += 1.0/i;
    }
    ans *= n;
    cout << fixed << setprecision(10) << ans << endl;
    return 0;
}