package oj.test;
import java.util.Scanner;
public class Demo12 {
/**
* @求小球落地5次后所经历的路程和第5次反弹的高度
* 假设一个球从任意高度自由落下,每次落地后反跳回原高度的一半; 再落下, 求它在第5次落地时,共经历多少米?第5次反
* 弹多高?
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int height = sc.nextInt();
double sum;
double ft;
ft = height / 32.0;
sum = height+2*(height/2.0+height/4.0+height/8.0+height/16.0);
sop(sum);
sop(ft);
}
private static void sop(Object obj) {
System.out.println(obj);
}
}