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<bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long int ll;
typedef pair<int,int> P;
const ll MOD=1000000007;
const ll INF=1000000010;
const ll LINF=4000000000000000010LL;
const int MAX=310;
const double EPS=1e-9;
int dx[4]={0,1,0,-1};
int dy[4]={1,0,-1,0};
int main(){
    double b;
    while(cin>>b,b){
        double a[11];
        a[1]=b;
        double sum=b;
        for(int i=2;i<=10;i++){
            if(i%2){
                a[i]=a[i-1]/3;
            }else{
                a[i]=a[i-1]*2;
            }
            sum+=a[i];
        }
        printf("%.9lf\n",sum);
    }   
}

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

C++: // 2011/03/29 Tazoe

#include <iostream>
using namespace std;

int main()
{
	while(true){
		double a;
		cin >> a;
		if(cin.eof())
			break;

		double sum = a;
		for(int i=2; i<=10; i++){
			if(i%2==0)
				a *= 2.0;
			else
				a /= 3.0;
			sum += a;
		}

		cout.precision(8);
		cout << fixed << sum << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<math.h>
#include<ctype.h>
#include<algorithm>
#include<queue>
#include<functional>
#include<iomanip>

#define INF 114514810

using namespace std;

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

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

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

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(){
    double 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\n",ans);
    }
    return 0;
}

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

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>
#include <iomanip>
#define MAX 30
using namespace std;


int main(){

  double ft; //ft:first term
  double sum = 0;
  while (cin >> ft){

    for(int i=0;i<10;i++){

      if(i==0){
      }
      else if(i%2==1){ //偶数
        ft = ft*2;
      }
      else if(i%2==0){ //奇数
        ft = ft/3;
      }
      sum+=ft;
    }
    cout << setprecision(10) << sum << endl;

    sum=0;
  }

 return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <cstdio>

using namespace std;

double s(double n)
{
    double ans=n;
    for(int i=1;i<10;++i)
    {
        if(i&1==1) n *= 2;
        else n /= 3;
        ans += n;
    }
    return ans;
}
int main()
{
    double n;
    while(cin >> n) printf("%.8f\n",s(n));
}

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

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

int main(){
    double  n;
    while(cin >>n){
        double ans = n, b = n;
        for(int i = 2; i <= N; i++){
            double tmp;
            if(i % 2 == 0){
                tmp = (b * 2);
            } else{
                tmp = (b / 3);
            }
            ans += tmp;
            b = tmp;
        }
        printf("%f\n", ans);
    }
    return 0;
}

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

double a, seq[10];

void solve() {
	seq[0] = a;

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

	//cout<<sum<<endl;
	printf("%.8f\n", sum);
}

int main(int argc, const char *argv[]) {
	while (cin>>a) {
		solve();
	}
	return 0;
}

C++: #include<iostream>
int main(){for(double a;!(std::cin>>a).eof();)printf("%.7f\n",a*211.f/27.f);}

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

#define iota(i,n,b,s) for(int i=int(b);i!=int((b)+(s)*(n));i+=(s))
#define range(i,n,m) iota(i,(((n)>(m))?((n)-(m)):((m)-(n))),(n),((n)>(m)?-1:1))
#define rep(i,n) iota(i,(n),0,1)
#define loop for(;;)

#define INF (1e9)
#define EPS (1e-9)
#define cons(a,b) (make_pair(a,b))
#define car(a) (a.first)
#define cdr(a) (a.second)
#define cadr(a) (car(cdr(a)))
#define cddr(a) (cdr(cdr(a)))
#define all(a) a.begin(), a.end()
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;

typedef long long Integer;
typedef long double Real;
typedef vector<int> vi;
typedef vector<string> vs;
typedef map<string,int> Dictionary;
const Real PI = acos(-1);

template<class S, class T>
ostream& operator<<(ostream& os, pair<S,T> p) {
  os << '(' << car(p) << ", " << cdr(p) << ')';
  return os;
}

template<class T>
ostream& operator<<(ostream& os, vector<T> v) {
  if (v.size() == 0) {
    os << "(empty)";
    return os;
  }
  os << v[0];
  for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
  return os;
}

int dx[] = { -1, 0, 1, 0 };
int dy[] = {  0, -1, 0, 1 };

char u[] = {'I', 'V', 'X', 'L', 'C', 'D', 'M'};
int v[] =  {1, 5, 10, 50, 100, 500, 1000};

int value_of (char c) {
  rep (i, 7) {
    if (c == u[i]) return v[i];
  }
}

int div(int a, int b, int n) {
  a %= b;
  a = a * 10;
  if (n == 1) return (a/b);
  return div(a, b, n - 1);
}

int main() {

  loop {
    long double a; cin >> a;
    if (!cin) break;
    printf("%0.10Lf\n", a * 7.81481481);
  }

  return 0;
}

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

C++: #include<iostream>
#include<iomanip>
using namespace std;
int main() {
	double a;
	double answer;
	while (cin >> a) {
		answer = a;
		for (int i = 2; i < 11; ++i) {
			answer+=(i % 2 ? a /= 3.0 : a *= 2.0);
		}
		cout <<setprecision(10)<< answer<<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);
		sum = 0;
	}
}