import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.regex : regex;
import std.container;

void main()
{
	foreach (line; stdin.byLine) {
		writefln("%.8f",line.chomp.to!double.recurrence!((a,n)=>n%2?2*a[n-1]:a[n-1]/3).take(10).reduce!("a+b"));
	}
}