#include<stdio.h>
int main()
{
    int h = 0;
    double sum = 0;
    int n = 5;
    scanf("%d", &h);
    double m = (double)h;
    while(n)
    {
        sum += m + m/2;
        m /= 2;
        n--;
    }
    printf("%lf\n", sum-m);
    printf("%lf\n", m);
}