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<stdio.h>
using namespace std;
int main(){
    double a[2];
    while(cin>>a[0]){
        int co=1;
        double ans=0;
        while(co<11){
            if(co%2)a[co%2]=a[(co%2+1)%2]*2;
            else a[co%2]=a[(co%2+1)%2]/3;
            ans+=a[(++co)%2];
        }
        printf("%.7f\n",ans);
    }
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
#define rep(i,n) for (int i = 0; i < n; i++)

int main() {
	double array[11];
	
	while (cin >> array[1]) {
		rep(i, 9) {
			if ((i + 2) % 2 == 0) {
				array[i + 2] = array[i + 1] * 2;
			}
			else {
				array[i + 2] = array[i + 1] / 3;
			}
		}

		double sum = 0;
		rep(i, 10) {
			sum += array[i + 1];
		}

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

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

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  double n;
  while(cin>>n){
    cin>>n;
    double now=n,sum=n;
    for(int j=0;j<9;j++){
      if(j%2==0){
	now=now*2;
	sum+=now;
      }else if(j%2==1){
	now=now/3;
	sum+=now;
      }
    }
    printf("%.8f\n",sum);
  }
  return 0;
}

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

using namespace std;

float a_1;

float s_n;

float fib(int i){
  if(i == 0)
  {
    return a_1;
  }else if((i + 1) % 2 == 0){
    return fib(i-1)*2.0f;
  }else{
    return fib(i-1)/3.0f;
  }
}

int main(void){


  while(scanf("%f", &a_1) != EOF)
  {

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

  return 0;
}

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

int main(){
	long double a, sum=0.0;
	
	while(1){
		cin>>a;
		if(cin.eof())break;
		sum=a;

		for(int i=2; i<=10; i++){
			if(i%2==0){
				a*=2;
				sum+=a;
			}else{
				a/=3;
				sum+=a;
			}
		}
		cout<<setprecision(10);
		cout<<sum<<"\n";
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
double sumofs(double);

int main(){
    double x,y;
    while (cin >>x){
        if (cin.eof()){break;}
        y = sumofs(x);
        printf("%.7f\n",y);
    }
}

double sumofs(double x){
    double a[10];
    double sum=0;
    a[0] = x;

    for (int i=0;i<9;i++){
        if(i%2==0)
            a[i+1]=a[i]*2;
        else
            a[i+1]=a[i]/3;
    }
    for (int j=0;j<10;j++)
        sum +=a[j];
    return sum;
}

C++: #include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define LOOP(i) while(i--)
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

int main(){
	//cin.tie(0);
	//ios::sync_with_stdio(false);

	double d;
	while(cin>>d){
		vector<double> S(10);
		S[0] = d;
		for(int i=1;i<10;i++){
			if((i%2)) S[i] = S[i-1]*2.0;
			else S[i]=S[i-1]/3.0;
		}
		printf("%.10lf\n",accumulate(ALL(S),0.0));
	}

	return 0;
}

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

int main(){
    vector<double> a(10);
    double sum;

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

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

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

    return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
long i;
double a,s;
while(cin>>a){
s=a;
for(i=0;i<4;i++){a*=2;s+=a;a/=3;s+=a;}
a*=2;s+=a;
printf("%.6f\n",s);
}
return 0;
}

C++: #include <stdio.h>

int main(void) {
  double a, be, ans;
  int i;
  while(scanf("%lf", &a) != EOF) {
    be = a, ans = a;
    for(i = 1; i < 10; ++i) {
      if(i % 2) be *= 2.0;
      else be /= 3.0;
      ans += be;
    }
    printf("%.12lf\n", ans);
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
 	double tm,sum=0,i=0;
	cin>>tm;
	for(;i<5;i++){
		sum+=tm;
		tm*=2;
		sum+=tm;
		tm/=3;
	}
	printf("%lf\n",sum);
}

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

int main() {
    double a;
    while (cin >> a) {
        double sum = 0;
        sum += a;
        sum += a * 2;
        sum += a * 2 / 3;
        sum += a * 4 / 3;
        sum += a * 4 / 9;
        sum += a * 8 / 9;
        sum += a * 8 / 27;
        sum += a * 16 / 27;
        sum += a * 16 / 81;
        sum += a * 32 / 81;
        cout.precision(8);
        cout << fixed;
        cout << sum << endl;
    }
    return 0;
}

C++: #include <stdio.h>

int main() {
        const int N = 11;
        double s;
        double a[N];

        while (scanf("%lf", &a[1]) != EOF) {
                s = a[1];
                for (int i = 2; i < N; i++) {
                        if (i % 2) {
                                a[i] = a[i-1]/3;
                        } else {
                                a[i] = a[i-1]*2;
                        }
                        s += a[i];
                }
                printf("%lf\n", s);
        }

        return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;

int main(){

	double n;
	while(~scanf("%lf",&n)){
		double seq[11];
		seq[1]=n;
		for(int i=2;i<=10;i++){
			seq[i] = i%2 ? seq[i-1] / 3.0 : seq[i-1] * 2.0;
		}

		double sum=0;
		for(int i=1;i<=10;i++){
			sum += seq[i];
		}
		printf("%.9f\n",sum);
	}
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<functional>
#include<queue>
#include<stack>
#include<set>
using namespace std;


int main(){
	long double a[10];
	long double now;
	while(cin>>now){
	for(int i=0;i<10;i++)a[i]=0.0;
	a[0]=now;
		for(int i=1;i<10;i++){
			if(i%2==1)a[i]=a[i-1]*2;//??¶??°
			else a[i]=a[i-1]/3;
		}
		long double sum=0;
		for(int i=0;i<10;i++)sum+=a[i];
		cout<<sum<<endl;
	}
}

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

using namespace std;

int main(){
    double n = 0;
    vector<double> vn(11,0);
    cin >> vn[1] ;
    for(int i = 2; i < 11;++i){
        if(i % 2 == 0){
            vn[i] = vn[i-1] * 2;
        }
        else{
            vn[i] = vn[i-1] / 3;
        }
        n += vn[i] ;
    }
    printf("%.12f\n", n + vn[1]);
    return 0;
}