#include <stdio.h> int main() { int n; while(scanf("%d", &n) != EOF) { float distance[6]; distance[0] = n; float total = distance[0]; for(int i = 1; i <= 5; i++) { distance[i] = distance[i - 1] / 2; if(i != 5){ total += distance[i]*2; } // printf("the %d time, total is %f\n", i, total); } printf("%.3f\n", total); printf("%.5f\n", distance[5]); } }