#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;
#define debug(x) cout << #x << " = " << x <<endl
const int maxn = 111111;

struct Array { 
    int L, R;
    int Z[maxn],F[maxn];
    Array(){}
    void clear() {
        L = 1; R = 1;
        memset(Z, 0, sizeof Z);
        memset(F, 0, sizeof F);
    }
    int&operator[](int i) {
        if(i > 0)return Z[i];
        return F[-i];
    }
    int operator[](int i)const {
        if(i > 0)return Z[i];
        return F[-i];
    }

}A;

void Print() {
    for(int i = A.L; i > 0; i--) {
        cout << A[i];
    }
    if( A.R < 0 ) {
        cout << '.';
        for(int i = 0; i >= A.R; --i) {
            cout<<A[i];
        }
    }
    cout << endl;
}

void LtoR() {
    for(int i = A.R; i <= A.L; ++i) {
        if (A[i] > 1) {
            int Gap = A[i] >> 1;
            A[i] %= 2;
            A[i+1] += Gap;
            A[i-2] += Gap;
            if (Gap) A.L = max(A.L, i+1);
            if (Gap) A.R = min(A.R, i-2);
        }
    }
    while(!A[A.L]) A.L--;
    while(!A[A.R]) A.R++;
}

void RtoL() {
    for(int i = A.R; i <= A.L; ++i) {
        if(A[i] && A[i+1] && i+1<=A.L) {
            int Gap = min(A[i], A[i+1]);
            A[i+2] += Gap;
            A[i] -= Gap;
            A[i+1] -= Gap;
            if (Gap) A.L = max(A.L, i+2);
        }
    }
    while(!A[A.L]) A.L--;
    while(!A[A.R]) A.R++;
}


int main()
{
    int n;
    while(cin >> n) {
        A.clear();
        A[1] = n;
        int Times = 100;
        while(Times--) {
            RtoL(); LtoR();
        }
        Print();
    }
    return 0;
}