const rl = require("readline").createInterface({ input: process.stdin });
var iter = rl[Symbol.asyncIterator]();
const readline = async () => (await iter.next()).value;
void (async function () {
let h = parseFloat(await readline());
let totalDistance = h; // 初始下落的路程
let reboundHeight = h / 2; // 第一次反弹的高度
for (let i = 1; i < 5; i++) {
totalDistance += 2 * reboundHeight; // 每次反弹后下落的路程
reboundHeight /= 2; // 下一次反弹的高度
}
console.log(totalDistance); // 输出总路程
console.log(reboundHeight); // 输出第五次反弹的高度
})();