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<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<string.h>
#include<vector>
#include<math.h>
#include<queue>
#include <algorithm>
#include<functional>
#include<cstdlib>
#include<cmath>


#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define CI cin >>
#define CO cout <<
#define E << endl;

using namespace std;

typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;



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


double N = 0;
int goal[2];
int M = 0;
vector<vector<int>>MV;


void input(void) {

	return;
}


int main(void) {
	double sum = 0;
	double num = 0;

	while (CI N) {
		sum += N;
		num = N;
		for (int i = 2; i <= 10; i++) {
			if (i % 2 == 0) {
				sum += num * 2;
				num *= 2;
			}
			if (i % 2 == 1) {
				sum += num / 3.0;
				num /= 3.0;
			}
		}
		printf("%.7f\n", sum);
		sum = 0;
		num = 0;
	}


	return 0;
}

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

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

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

C++: #include <bits/stdc++.h>
#define INF 114514810
#define FOR(i, r, n) for(int i=(r); i<(n); i++) 
#define REP(i, n) FOR(i, (0), n)

using namespace std;

double a[12], sum = 0;

int main(){
	while (cin >> a[0]){
		FOR(i, 1, 10){
			if (!(i % 2)) a[i] = a[i - 1] / 3;
			else a[i] = a[i - 1] * 2;
		}
		REP(i, 10) sum += a[i];
		cout.precision(10);
		cout << sum << endl;
		sum = 0;
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
 	double tm,sum=0,i=0;
	while(cin>>tm){
		for(;i<5;i++){
			sum+=tm;
			tm*=2;
			sum+=tm;
			tm/=3;
		}
		printf("%lf\n",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(){
    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<cstdio>
#include<iostream>
using namespace std;
int main(){
  double a,b=7.81481481481481;
  while( scanf("%lf",&a) !=EOF)
  printf("%f\n",a*b);
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
template<typename V> constexpr typename V::value_type sum(const V &v) { return accumulate(all(v), 0); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  vd dp(10);
  while (cin >> dp[0]) {
    loop(i, 1, 10) dp[i] = odd(i) ? dp[i - 1] * 2 : dp[i - 1] / 3;
    cout << prec(8) << accumulate(all(dp), 0.0) << endl;
  }
}

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 "stdio.h"
#include <iostream>
using namespace std;

/** Problem0055 : Sequence **/
int main()
{
	double input, sum, old;
	
	while (cin >> input) {
		sum = input;
		old = input;
		for (int i=2; i<=10; i++) {
			if (i%2==0) {
				sum+=old*2;
				old=old*2;
			} else {
				sum+=old/3;
				old=old/3;
			}
		}
		printf("%.8lf\n", sum);
	}
	
	return 0;
}

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

using namespace std;

double a_1;
double s_n;
std::array<double , 10> arr ;

double fib(int i){
  double f[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 <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <complex>
using namespace std;

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

#define all(c) (c).begin(),(c).end()
#define pb push_back
#define mp make_pair
#define ERASE(v,i) (v).erase(remove(all(v),i),(v).end())
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define each(it,c) for(typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define debug(x) cerr<<#x<<" = "<<(x)<<endl;
#define LINE cerr<<"LINE: "<<__LINE__<<endl;

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();}
template<class T> void preview(T a,T b){for(T it=a;it!=b;++it)cerr<<*it<<" ";cerr<<endl;}

const int INF = 100000000;
const double PI = acos(-1.0), EPS = 1e-10;

int main() {
	for(double a; cin >> a;) {
		double ans = a;
		for(int i = 2; i <= 10; i++) {
			a = (i % 2 == 0) ? (a * 2) : (a / 3);
			ans += a;
		}
		printf("%.8f\n", ans);
	}
	return 0;
}