#include <bits/stdc++.h>
using namespace std;
void process(int num, double& distance, double& high){
double tmp = (double)num;
for(int i = 0; i < 5; i++){
distance += tmp * 2;
tmp = tmp / 2;
}
distance = distance - (double)num;
high = tmp;
}
int main(){
int num = 0;
cin >> num;
double distance = 0.0;
double high = 0.0;
process(num, distance, high);
printf("%lf\n", distance);
printf("%lf\n", high);
return 0;
}