import java.io.*;
import java.util.*;

public class Main{
    public static void main(String[] args) throws Exception{
        Scanner sc = new Scanner(System.in);
        while(sc.hasNextInt()){
            int h = sc.nextInt();
            calc((double)h);
        }
    }
    public static void calc(double h){
        double sum = 0.0;
        sum = h + h + h/2 + h/4 + h/8;
        double bh = (double)h/2;
        for(int i = 0; i <= 4; ++i){
            bh /= 2;
        }
        System.out.println(String.format("%.6f",sum));
        System.out.println(String.format("%.6f",bh * 2));
    }
}