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;
double calc(int r, double before) {
    if(r % 2 == 0) return((double)before / 3.0);
    else           return((double)before * 2.0);
}

int main(void) {
    double a;
    while(cin >> a) {
        double ary[10]; ary[0] = a;
        double sum = a;
        for(int r = 1; r < 10; r++) {
            ary[r] = calc(r, ary[r - 1]); sum += ary[r];
        }
        printf("%.8f\n", sum);
    }
    return(0);
}

C++: #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
#include<map>
#include<cmath>
#include<complex>
using namespace std;

typedef complex<double> P;

#define X real()
#define Y imag()
typedef int kz;

kz gcd(kz a,kz b) { if(b==0) return a; else gcd(b,a%b); }

int main(){
    int mod=1000000007;
    double tmp=7.814814814814;
    double n;
    while (scanf("%lf",&n)!=EOF) {
        printf("%.10lf\n",n*tmp);
    }
    return 0;
}

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

using namespace std;

int main()
{
	double a, s;

	while (1) {
		cin >> a;
		if (cin.eof())	break;

		s = a;
		for (int i = 0; i < 9; i++) {
			if (i % 2 == 0) {
				s += a * 2;
				a *= 2;
			}
			else {
				s += a / 3;
				a /= 3;
			}
		}

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

	return 0;
}

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

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int main() {
	double f;
	while(cin>>f){
		printf("%.10f\n",f*211/27);
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<iomanip>
using namespace std;
int main(){
	double a,s;
	while(cin>>a){
		s=a;
		for(int i=1;i<10;i++){
			if(i%2==1){
				s+=a*2;
				a*=2;
			}
			if(i%2==0){
				s+=a/3;
				a/=3;
			}
		}
		cout<<fixed<<setprecision(10)<<s<<endl;
	}
	return 0;
}

C++: #include<cstdio>
 
int main(){
    double sum;
    double a;
    int i;
    while(~scanf("%lf",&a)){
        sum=0;
        sum+=a;
        for(i=2;i<=10;i++){
 
            if(i%2==0){
                a=2*a;
            }else{
                a=a/3;
            }
            sum+=a;
        }
        printf("%f\n",sum);
    }
     
    return 0;
}

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

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

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

C++: #include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < int(n); i++)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= int(n); i++)
#define rreps(i, n) for (int i = int(n); i >= 1; i--)
#define repc(i, n) for (int i = 0; i <= int(n); i++)
#define rrepc(i, n) for (int i = int(n); i >= 0; i--)
#define repi(i, a, b) for (int i = int(a); i < int(b); i++)
#define repic(i, a, b) for (int i = int(a); i <= int(b); i++)
#define repp(i, n) rep(i, n)
#define reppp(i, n) repp(i, n)
#define rrepp(i, n) rrep(i, n)
#define repss(i, n) reps(i, n)
#define repcc(i, n) repc(i, n)
#define repii(i, a, b) repi(i, a, b)
#define each(x, y) for (auto &x : y)
#define all(a) (a).begin(), (a).end()
#define bit(b) (1ll << (b))

using namespace std;

using i32 = int;
using i64 = long long;
using u64 = unsigned long long;
using f80 = long double;
using vi32 = vector<i32>;
using vi64 = vector<i64>;
using vu64 = vector<u64>;
using vf80 = vector<f80>;
using vstr = vector<string>;

inline void yes() { cout << "Yes" << '\n'; exit(0); }
inline void no() { cout << "No" << '\n'; exit(0); }
inline i64 gcd(i64 a, i64 b) { if (min(a, b) == 0) return max(a, b); if (a % b == 0) return b; return gcd(b, a % b); }
inline i64 lcm(i64 a, i64 b) { return a / gcd(a, b) * b; }
inline u64 xorshift() { static u64 x = 88172645463325252ull; x = x ^ (x << 7); return x = x ^ (x >> 9); }
void solve(); int main() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(16); solve(); return 0; }
template <typename T> class pqasc : public priority_queue<T, vector<T>, greater<T>> {};
template <typename T> class pqdesc : public priority_queue<T, vector<T>, less<T>> {};
template <typename T> inline void amax(T &x, T y) { if (x < y) x = y; }
template <typename T> inline void amin(T &x, T y) { if (x > y) x = y; }
template <typename T> inline T power(T x, i64 n, T e = 1) { T r = e; while (n > 0) { if (n & 1) r *= x; x *= x; n >>= 1; } return r; }
template <typename T> istream& operator>>(istream &is, vector<T> &v) { each(x, v) is >> x; return is; }
template <typename T> ostream& operator<<(ostream &os, vector<T> &v) { rep(i, v.size()) { if (i) os << ' '; os << v[i]; } return os; }
template <typename T, typename S> istream& operator>>(istream &is, pair<T, S> &p) { is >> p.first >> p.second; return is; }
template <typename T, typename S> ostream& operator<<(ostream &os, pair<T, S> &p) { os << p.first << ' ' << p.second; return os; }

void solve() {
  f80 a;
  while (cin >> a) {
    f80 ans = a;
    rep(i, 9) {
      if (i % 2 == 0) a *= 2; else a /= 3;
      ans += a;
    }
    cout << ans << '\n';
  }
}

C++: #include <stdio.h>

int main(void) {

  double a[10];
  double s;
  int i;
  while(1) {
  scanf("%lf",&a[0]);
 
  for(i=0;i<4;i++) {

    a[2*i+1]=2.0*a[2*i];
    a[2*i+2]=a[2*i+1]/3.0;

  }

  a[9]=2.0*a[8];

  s=0.0;

  for(i=0;i<10;i++) {
    
    s+=a[i];

  }

  printf("%.8lf\n",s);
  }
  return 0;

}

C++: #include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
int main(){
  double a;
  while(cin >> a){
    double s[11] ={}, 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 << fixed << setprecision(8) << ans << endl;
  }
}

C++: #include<cstdio>
int main(){
    double d;
    while(scanf("%lf",&d)!=-1){
        double sum=d;
        for(int i=2;i<=10;i++){
            if(i%2==0) d*=2;
            else d/=3;
            sum+=d;
        }
        printf("%lf\n",sum);
    }
}

C++: #include<cstdio>

using namespace std;

int main(void){
	double a;
	
	while(scanf("%lf", &a) != EOF){
		double n[11];
		n[1] = (double)a;
		
		for(int i = 2; i < 11; i++){
			if(i%2){
				n[i] = n[i-1]/3;
			}else{
				n[i] = n[i-1]*2;
			}
		}
		
		double ans = 0;
		for(int i = 1; i < 11; i++){
			ans += n[i];
		}
		
		printf("%lf\n", ans);
	}
	return 0;
}