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<cmath>
using namespace std;
int main(){

  double a;
  
  while(cin >> a){

    double s[10] ={},ans = 0;

    for(int i = 1; i <= 10; i++){
      int si = 0, bo = 0;
      if(i == 1){
        s[i] = a;
      }
      else if(i % 2 == 0){
        si = pow(2, i/2);
        bo = pow(3, i/2 - 1);
        s[i] = a * (si / bo);
      }
      else{
        si = pow(2, i/2);
        bo = pow(3, i/2);
        s[i] = a * (si / bo);
      }

      ans += s[i];
    }

    cout << ans << endl;
  }
  
}

C++: #define _CRT_SECURE_NO_WARNINGS

#include<fstream>
#include<iostream>
#include<string>
#include<iomanip>
#include<list>
#include<math.h>
#include<stack>
#include<queue>
#include<vector>
#include<algorithm>
#include<utility>

using namespace std;

int pyra[150000000];
int save[150000000];

int main(){
	double n[10];
	while (cin >> n[0]) {
	  long double ans = 0;
	  for (int i = 1; i < 10; i++) {
		  if (i % 2 == 0) {
			  n[i] = n[i - 1] / 3;
		  } else {
			  n[i] = n[i - 1] * 2;
		  }
	  }
	  for (int i = 0; i < 10; i++) {
		  ans += n[i];
		}
		cout.precision(10);
	  cout << ans << endl;
  }
	return 0;
}

C++: #import<stdlib.h>
main(a){for(;~scanf("%as",&a);)printf("%f\n",atof(a)*211/27);}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  double n;
  while(cin >>n){
    double ans = n;
    for(int i=2; i<=10; i++){
      if(i%2 == 0) n*=2;
      else n/=3;
      ans+=n;
    }
    printf("%.8lf\n",ans);
  }
  return 0;
}

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

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

C++: #include <iostream>

using namespace std;

int main(){
   double a;
   while(cin >> a){
      double s = a;
      for(int i=2;i<11;i++){
	 if (i % 2) a /= 3;
	 else  a *= 2;
	 s += a;
      }
      cout.precision(8);
      cout << fixed << s << endl;         
   }
   return 0;
}

C++: #include<iostream>
#include<iomanip>

using namespace std;

int main(void)
{
	while(1)
	{
		double a,ans;
		if(!(cin>>a))break;
		ans=a;
		for(int i=1;i<10;i++)
		{
			if(i%2==1)
			{
				a*=2;
			}
			else
			{
				a/=3;
			}
			ans+=a;
		}
		cout<<fixed<<setprecision(8)<<ans<<endl;
	}
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<complex>
#include<map>

#define f first
#define s second

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define EPS (1e-10)
using namespace std;

typedef unsigned int uint;
typedef long long ll;
typedef complex<double> P;

int main(){
  double a;
  while(cin>>a){
    double ans = a;
    REP(i,9){
      if(i%2 == 0)
	a *= 2.0;
      else
	a /= 3.0;
      ans += a;
    }
    printf("%.8f\n",ans);
  }
  return 0;
}

C++: #include <string>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <typeinfo>
#include <map>
#define INF 100000000
#define rep(i,a) for(int i=0;i<(a);i++)

using namespace std;
typedef long long ll;

int main(){
    int f;
    while(cin>>f){
        double data[10];
        data[0]=f;
        for(int i=1;i<10;i++){
            if((i+1)%2==0)data[i]=data[i-1]*2;
            else data[i]=data[i-1]/3;
        }
        double ans=0;
        rep(i,10)ans+=data[i];
        printf("%12.10lf",ans);
    }
    return 0;
}

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){

  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", s_n);
    }
  }

  return 0;
}

C++: #define _USE_MATH_DEFINES
#include<iostream>
#include<iomanip>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<climits>
#include<cmath>
#include<cstdio>
#include<deque>
#include<list>
#include<map>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<queue>
#include<vector>
using namespace std;

int main() {
	cout << fixed << setprecision(8);
	for (double a; cin >> a;) {
		double s = a;
		for (int i = 2; i <= 10; i++)
			s += (i % 2) ? a = a / 3 : a = a * 2;
		cout << s << endl;
	}
	return 0;
}

C++: #include<iostream>
#include <iomanip>

using namespace std;
int main()
{
  double s;

  for(;cin>>s;)
    {
  double sum=s;
  for(int i=2;i<=10;i++)
    {
      if(i%2==0)
	s*=2;
      else
	s/=3;
      sum+=s;
    }
   cout<< fixed << setprecision(8)<<sum<<endl;
    }
}

C++: #include <iostream>
#include <cstdio>
#include <iomanip>

using namespace std;

int main() {
    double sum = 0;
    double a[10];

    while (cin >> a[0]) {
        sum = 0;
        for (int i = 1; i < 10; i++) a[i] = 0;
        for (int i = 1; i < 10; i++) {
            if (i % 2 == 0) {
                a[i] = a[i-1] / 3.0;
            } else {
                a[i] = a[i-1] * 2.0;
            }
        }

        for (int i = 0; i < 10; i++) {
            sum += a[i];
        }

        printf("%.8f\n", sum);
//        cout << setw(2) << setprecision(10) << sum << endl;
    }
    return 0;
}