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>
#include <cmath>
#include <cstdlib>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <sstream>
#include <vector>
#include <string>
#include <iomanip>
#include <bitset>
#define INF	100000000
#define pb	push_back
#define fi first
#define sec second
#define SS stringstream
using namespace std;
typedef pair<int, int> P;
typedef long long int	ll;

double a;

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

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

using namespace std;

double keisan (double b,int k) {
	if (k == 1) {
		return b;
	} else if (k % 2  == 0){
		return keisan(b*2,k-1);
	} else {
		return keisan(b/3,k-1);
	}
}

int main() {
	double a;
	double b;
	while (cin >> a) {
		b = 0;

		for (int i = 1; i <= 10; i++) {
			b += keisan(a,i);
		}

		printf("%.8f\n",b);
	}
	return 0;
}

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

int main(){
  double a[11],ans;
  while(cin>>a[1]){
   
    ans=a[1];
    for(int i=2;i<11;i++){
      if(i%2){
	a[i]=a[i-1]/3.0;
      }else{
	a[i]=a[i-1]*2.0;
      }
      ans+=a[i];
    }
    printf("%.8f\n",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++: //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 <queue>
#include <iterator>
#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;

//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 gcd(int a, int b){
   int tmp;
   while(a%b==0){
      tmp=a%b;
      a=b;
      b=tmp;
   }
}

int lcm(int a,int b){
   return a*b/gcd(a,b);
}

bool prime_number(int n){
   if(n < 2){
      return false;
   }
   else if(n == 2){
      return true;
   }
   if(n % 2 == 0){
      return false;
   }
   for(int i=3;i<=n/i;i+=2){
      if(n % i == 0) return false;
      return true;
   }
}

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

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

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

}

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

int main()
{
  double n;

  while (cin >> n){
    double sum = 0;
    sum += n;
    for (int i = 2; i <= 10; i++){
      if (i % 2 == 0){
        n *= 2;
      }
      else {
        n /= 3;
      }
      sum += n;
    }
    printf("%.8f\n", sum);
  }

  return (0);
}

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

int main(){
    double n,s[10];
    
    while(cin >> n){
        double ans = 0.0;
        s[0] = n;
        
        for(int i = 1 ; i < 10 ;i++){
            if((i+1)%2==0) s[i] = 2.0*s[i-1];
            else s[i] = s[i-1] / 3.0;
        }
        
        for(int i = 0 ; i < 10 ; i++) ans += s[i];
        cout << ans << endl;
    }

    return 0;
}

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

int main(){
	double s[10], sum;
	while(cin >> s[0]){
		for(int i = 1; i < 10; i++){
			if(i%2 == 1) s[i] = s[i-1] * 2;
			else s[i] = s[i-1] / 3;
		}

		for(int i = 0; i < 10; i++){
			sum += s[i];
		}
		printf("%.8lf\n", sum);
	}
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
main(){
  double a;
  while(~scanf("%lf",&a)){
    double S[11];
    S[0]=a;
    for(int i=1;i<10;i++){
      if(i%2) S[i]=S[i-1]*2.0f;
      else S[i]=S[i-1]/3.0f;
    } 
    double res =0.0f;
    for(int i=0;i<10;i++) res += S[i];
    printf("%.8lf\n",res);
  }
}

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

int main() {
	double n, sum, a;
	while (cin >> n) {
		sum = a = n;
		for (int i = 2; i <= 10; i++) {
			if (i % 2 == 0) {
				a = a * 2;
				sum += a;
			} else {
				a = a / 3;
				sum += a;
			}
		}
		cout << sum << endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(int argc, char const* argv[])
{
	double a;
	double sum;

	while( cin >> a ){
		sum = a;
		for( int i = 2;i <= 10;i++ ){
			if( i % 2 ){
				a /= 3;
			} else {
				a *= 2;
			}
			sum += a;
		}

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

C++: #define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <list>
#include <utility>
#include <numeric>

using namespace std;
typedef long long llong;
typedef unsigned long long ullong;

const ullong MOD = 1000000000 + 7;

int main()
{
	double a;
	for (; cin >> a;)
	{
		double a0 = a;
		double sum = a;
		for (int i = 2; i <= 10; i++)
		{
			if (i % 2 == 0)
			{
				a0 = a * 2;
				sum += a0;
			}
			else
			{
				a0 = a / 3;
				sum += a0;
			}
			a = a0;
		}

		cout << fixed << setprecision(8) << sum << endl;
	}
}