#include <iostream>
#include <math.h>
#include <iomanip>
using namespace std;

int main(){
    double num;
    double sum_High;
    double high;
    while(cin >> num){
        
        sum_High = num+(num*0.5*(1-pow(0.5,4))/(1-0.5))*2;//把第一项提出来。后续每项都是上下两段路程,所以求4项和之后乘以2
        high = num*pow(0.5,5);
        cout << fixed << setprecision(6) << sum_High << endl;
        cout << fixed << setprecision(6) << high << endl;                       
    }
}