import java.util.*;

public class Main{

public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()){
        int h = sc.nextInt();
        //等比数列前n项和的变形,第一次为单次,从第二次开始,初始值为h / 2.0, 落下加反弹,所以需要乘以2
        System.out.println(h + 2 * (h / 2.0) * ((1 - Math.pow(0.5, 4)) / (1 - 0.5)));
        //等比数列第n项式
        System.out.println(h * Math.pow(0.5, 5));
    }
}

}