Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanLines)
	for sc.Scan() {
		n, _ := strconv.ParseFloat(sc.Text(), 64)
		ans := n
		sum := n
		for i := 2; i <= 10; i++ {
			if i%2 == 0 {
				ans *= 2
				sum += ans
			} else {
				ans /= 3
				sum += ans
			}
		}
		fmt.Println(sum)
	}
}

C++: #include<iostream>
#include<cstdio>
using namespace std;

int main(){
  int i,j,n;
  double sum=0,im,im2[1000];

  while(cin >> im){
    sum=0;
    im2[1]=im;
    sum+=im;
    for(i=2;i<=10;i++){
      if(i%2 == 0){
	im2[i]=im2[i-1]*2;
	sum+=im2[i];
      }
      else{
	im2[i]=im2[i-1]/3;
	sum+=im2[i];
      }
      //cout << "im2["<<i<<"] = "<<im2[i]<<endl;

    }

    printf("%.8f\n",sum);

  }

C++: #include <iostream>
#include <stdio.h>
#include <array>

using namespace std;

double a_1;
double s_n;
array<double , 10> arr ;

double fib(int i){
  if(i ==1){
  }else if(i % 2 == 0){
    arr[i] = arr[i-1] * 2;
  }else{
    arr[i] = arr[i-1] / 3;
  }
  return arr[i];
}

int main(void){
    
     while(scanf("%f", &a_1) != EOF){
         std::cin >> a_1;
  arr[1] = a_1;
  scanf("%lf", &a_1);

  for(int i = 1; i <= 10; i++){
    s_n += fib(i);
    if(i == 10){
      printf("%lf\n", s_n);
    }
    
  }
  s_n = 0;
     }

  

  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
    double a;
    while(cin>>a){
        double S=a;
        for(int i=0;i<9;i++){
            a=((i&1)?a/3:a*2);
            S+=a;
        }
        cout<<setprecision(8)<<S<<endl;
    }

    return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <vector>
#include <set>

using namespace std;
typedef long long LL;
static const double EPS = 1e-9;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n) 

int main(void){  
  double a[10];
  while(cin >> a[0]){
    double s=a[0];
    for(int i=1; i<10; i++){
      if(i%2==1) a[i] = a[i-1] * 2;
      else a[i] = a[i-1] / 3;
      s += a[i];
    }
    printf("%.8f\n",s);
  }
}

C++: #include <stdio.h>

int main(void){
	double a;
	double s = 0;

	while(scanf("%lf", &a) != EOF){
		s = a;
		for(int i=2; i<=10; i++){
			if(i%2 == 0){
				a = a*2;
				s += a;
			}else{
				a = a/3;
				s += a;
			}
		}
		printf("%.8f\n", s);
	}

	return 0;
}

C++: #include <cstdio>

using namespace std;

int main(){
	double a,sum;
	while(~scanf("%lf",&a)){
		sum=0;
		for(int i=0;i<10;i++){
			sum+=a;
			if(i%2==1){
				a=a/3;
			}
			else{
				a=a*2;
			}
		}
		printf("%.8lf\n",sum);
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
using namespace std;

double d(double a)
{
	double b;
	b = a * 2;
	return b;
}
double t(double a)
{
	double b;
	b = a / 3;
	return b;
}
int main()
{
	double n;
	
	while (cin >> n)
	{
		double a = 0;
		double q[10];
		q[0] = n;
		for (int i = 0; i < 10; i++)
		{
			if (i % 2 == 0)
			{
				q[i + 1] = d(q[i]);
			}
			if (i % 2 == 1)
			{
				q[i + 1] = t(q[i]);
			}
		}
		for (int i = 0; i < 10; i++)
		{
			a = q[i] + a;
		}
		cout << fixed << setprecision(8) << a << endl;
	}


	return 0;
}

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int main() {
  double n, sum, a[10];

  while(cin >> n) {
    sum = 0;
    a[0] = n;
    for(int i = 1; i < 10; i++) {
      if(i%2 == 1) a[i] = a[i-1] * 2;
      else a[i] = a[i-1] / 3;
    }
    for(int i = 0; i < 10; i++) sum += a[i];
    printf("%.8lf\n", sum);
  }
}

C++: #include <iostream>
using namespace std;

int main(){
    double n;
    while(cin >> n){
        cout << n * 7.81481481 << endl;
    }
    return 0;
}

C++: #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <complex>
#include <ctime>
#include <cstdlib>

using namespace std;

inline int to_int(string s) {int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string to_str(T x) {ostringstream sout; sout << x; return sout.str();}

typedef long long ll;

int main()
{
	double num, ans;
	while(cin >> num)
	{
		ans = num;
		num *= 2;
		ans += num;

		for(int i = 0; i < 4; i++)
		{
			num /= 3;
			ans += num;
			num *= 2;
			ans += num;
		}

		printf("%.7f" ,ans);
	}
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
#include<stdio.h>
int main(){
	int i;
	double a[10];
	while(cin >> a[0]){
		double s=a[0];
		for(i=1;i<10;i++){
			if(i%2==1){
				a[i] = a[i-1]*2;
			}else{
				a[i] = a[i-1]/3;
			}
			s += a[i];
		}
		printf("%.8f\n",s);
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
double ans;
double func(double d, int n){
	//printf("%f\n", d);
	ans += d;
	if(n == 11)return d;
	if(n % 2)return func(d/3.0, n+1);
	return func(2.0*d, n+1);
}

int main(){
	double d;
	while(scanf("%lf", &d) != EOF){
		ans = 0;func(d, 2);
		printf("%f\n", ans);
	}
	return 0;
}

C++: #include<stdio.h>

int main(){
	double a;
	while(~scanf("%lf",&a)){
		double b=a,c=a;
		for(int i=2;i<=10;i++){
			if(i%2)b/=3;
			else b*=2;
			c+=b;
		}
		printf("%.8lf\n",c);
	}
}

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<vector>
#define INF 999999
using namespace std;
int main(){
    double N;
    while(cin>>N){
        double A=0;
        A=N;
        for(int i=2;i<11;i++){
            if(i%2==0)N*=2;
            else N/=3;
            A+=N;
        }
        printf("%.8lf\n",A);
    }
    return 0;
}

C++: #include <stdio.h>
#include <math.h>

int main(void){
    double a,sum;
    
    while (scanf("%lf", &a)!=EOF){
        sum=0;
        for(int i=1; i<=10; i++){
            sum+=a;
      //      printf("%2d:%8f (sum:%.6f)\n",i,a,sum);
            if (i%2) a *= 2;
            else a /= 3;
        }
        printf("%f\n",sum);
    }
    return 0;
}