import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNextInt()) {
int a = in.nextInt();
double d = a;
//记录下落的路程
double sum1 = 0;
//记录弹起的路程
double sum2 = 0;
for(int i = 0; i<5; i++){
sum1 += d;
d = d/2;
sum2 += d;
}
//第五次之后未弹起,须减掉
System.out.println(sum1 + sum2 - d);
System.out.println(d);
}
}
}