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;
#pragma GCC optimize("Ofast")
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(int (i)=0;i<(n);i++)
#define REP(i,m,n) for(int (i)=(m);(i)<(n);(i)++)
#define INF LLONG_MAX - 100
#define MOD 1000000007
#define fcout cout << fixed << setprecision(15)
#define int long long
#define yorn(f) puts((f)?"Yes":"No")
#define YORN(f) puts((f)?"YES":"NO")
#define lowb lower_bound
#define upb upper_bound
typedef long long ll;
typedef pair<int, int> P;
typedef priority_queue<int> pque;
int gcd(int a,int b){return b?gcd(b,a%b):a;};
int lcm(int a,int b){return a/gcd(a,b)*b;};
int mod(int a,int b){return (a+b-1)/b;};
int month[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
template<typename A, size_t N, typename T>
void Fill(A(&array)[N],const T &val){std::fill((T*)array,(T*)(array+N),val);}
template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;};
template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;};



signed main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);

    double f;
	while (cin >> f) {
		double cnt = f;
		for (int i = 2; i <= 10; i++) {
			if (i & 1)f /= 3;
			else f *= 2;
			cnt += f;
		}
		fcout << cnt << endl;
	}
    return 0;
}

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

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

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


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

int main(){
  double a;
  while(cin>>a){
    printf("%.20lf\n",solve(a));
  }
}

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

typedef long long ll;
typedef unsigned long long ull;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back

double a;

double f(int n) {
    if(n == 1) return a;
    if(n % 2 == 0)
        return f(n-1) * 2.0;
    else
        return f(n-1) / 3.0;
}

int main() {
    while(cin >> a) {
        double ans = 0;
        for(int i=1; i<=10; i++) ans += f(i);
        printf("%20lf\n", ans);
    }

    return 0;
}

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

using namespace std;

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

C++: #include <iostream>
using namespace std;
int main(){
  double n,ans;
  cin >> n;
    ans = n;
    for(int i = 2 ; i <= 10 ; i++){
      if(i%2 == 1){
	n = n/3.0;
	ans += n;
      }
      else{
	n*=2.0;
	ans +=n;
      }
    }
    printf("%.6f\n",ans);
}

C++: #include <stdio.h>

int main(){
	double a;
	while(scanf("%lf",&a) != EOF){
		printf("%.8f\n",a * 211 / 27);
	}
	return 0;
}

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

C++: #include<iostream>
#include<cmath>
#include<iomanip>
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 << fixed << setprecision(8) << ans << endl;
  }
  
}

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

int main()
{
	double a,s;
	while(scanf("%lf",&a)!=EOF)
	{
		s=a;
		for(int i=2; i<=10; i++)
		{
			a=(i%2 ? a/3.0 : a*2.0);
			s+=a;
		}
		printf("%.8lf\n",s);
	}
}

C++: #include <cstdio>

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

C++: #include <iostream>
#include <vector>
#include <list>
#include <algorithm>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <sstream>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>

#define rep(i, n) for(int i = 0; i < n; i ++)
#define ITER(c) __typeof((c).begin())
#define each(c, it) for(ITER(c) it =(c).begin(); it!=(c).end(); it++)
#define ALL(c) c.begin(), c.end()
#define mp make_pair
#define pb push_back
#define MEMSET(v, h) memset((v), h, sizeof(v))
 
using namespace std; 

typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;

const int INF = 1 << 24;
 
int main(void){
    for(double a, s; s = 0, cin >> a; printf("%.8f\n", s))
        rep(i, 10) s += a /= i ? i % 2 ? 0.5:3:1;
 
    return 0;
}

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


using namespace std;

void Solution()
{
    double xA, yA;
    double xB, yB;
    double xC, yC;
    double xD, yD;
    
    while(cin>>xA>>yA>>xB>>yB>>xC>>yC>>xD>>yD)
    {
        //algorithm
        double a,b,c,d;
        
        a = (yA-yB);
        b = (xA-xB);
        c = (yC-yD);
        d = (xC-xD);
        
        (a*c + b*d == 0) ? puts("YES") : puts("NO");
    }

}


int main()
{
    Solution();
    return 0;
}

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(){
    int 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<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define CC puts("-------ok--------");
#define all(in) in.begin(), in.end()
using namespace std;
typedef pair<int, int> pii;
#define MAX 99999999
int main(){
    double a,ans=0;
    while(cin>>a){
        vector<ld>v(11,0);
        loop(i,1,11){
            if(i==1){v[1]=a;ans=a;}
            else if(i%2){
                v[i]=v[i-1]/3;
                ans+=v[i];
            }else {
                v[i]=v[i-1]*2;
                ans+=v[i];
            }
        }
        printf("%6lf\n",ans);
    }
}