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 <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;

double sum = 0, a, b;

int main(){
	while (cin >> a){
		sum += a;
		REP(i, 4){
			b = a * 2;
			sum += b;
			a = b / 3;
			sum += a;
		}
		printf("%.10lf\n", sum + a * 2);
		sum = 0;
	}
}

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

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

C++: #include<stdio.h>
#include<string>
#include<stdlib.h>
#include<math.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<numeric>
#include<string.h>
#include<map>
#include<queue>

using namespace std;

typedef pair<int,int> pii;

#define rep(i,j) for(int i=0;i<(j);i++)
#define reps(i,j,k) for(int i=j;i<=k;i++)
#define in(i,j,k) ((i)>=(j)&&(i)<=(k))


int main(){
	double a,s;
	while(~scanf("%lf",&a)){
		s=a;
		rep(i,9){
			if(i%2)a/=3;
			else a*=2;
			s+=a;
		}
		printf("%lf\n",s);
	}
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<string>
#include<string.h>
#include<math.h>
#include<utility>
#include<algorithm>
#include<functional>
using namespace std;
 
  
int main()
{
    
    while(cin>>a)
    {
     double a=0;
    double s=0;
     
    s=a;
    for(int i=0;i<4;i++)
    {
    a=2*a;
    s=s+a;
    a=a/3;
    s=s+a;
 
    }
    s=s+a*2;
    cout<<s<<endl;
    }
    return 0;
}

C++: #include <stdio.h>

int main(void) {

  double a[10];
  double s;
  int i;
  
  while(scanf("%lf",&a[0])!=EOF) {
 
    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 <cstdio>
#include <string>
#include <sstream>
#include <algorithm>
#include <math.h>
//#include <map>
#include <iomanip>
#include <vector>

using namespace std;



int main()
{
	double a;
	double suretu[10];
	double s;
	
	cout << fixed << setprecision(8);
	
	while (cin >> a)
	{
		s = 0;
		
		suretu[0] = a;
		for (int i=1; i<10; i++)
		{
			if (i % 2 == 0)
			{
				//奇数番目の項
				suretu[i] = suretu[i-1] / 3;
			} else {
				//偶数番目の項
				suretu[i] = suretu[i-1] * 2;
			}
		}
		
		for (int i=0; i<10; i++) s += suretu[i];
		
		cout << s << endl;
	}
	
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
#define int long long
signed main(){
	double a;
	while( scanf("%lf", &a) != EOF ){
		double sum = a;
		for(int i=1;i<10;i++){
			if(i%2 == 0) a /= 3;
			else a *= 2;
			sum += a;
		}
		cout << sum << endl;
	}
	return 0;
}
KAGUYA:AOJ0

C++: #include<iostream>
#include<iomanip>
int main()
{
	while (true)
	{
		double a;
		std::cin >> a;
		std::cout << std::fixed << std::setprecision(10) << a * 211 / 27 << std::endl;
	}
	return 0;
}

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

using namespace std;

//double solve(double n)

int main(void){

	double sum,table[11]={0};
	
	while(cin>>table[0]){
		sum=table[0];
		for(int i=1;i<10;i++){
			if(i%2==0){
				table[i]=table[i-1]/3;
			}
			else{
				table[i]=table[i-1]*2;	
			}			
			sum=sum+table[i];
		}
		printf("%.9f\n",sum);
		memset(table,0,sizeof(table));
	}
}

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


int main(){
float a;
cin >> a;
for(int i=1; i<11; i++){
if(i%2==0){
a*=2; 
}
if(i%2==1){
a/=3;
}
}
cout << a;
return 0;
}

C++: #include <cstdio>

using namespace std;

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

C++: #include<iostream>
#include<math.h>
#include<string>
#include<vector>
#include<algorithm>
#include<queue>
#include<map>
#include<iomanip>
using namespace std;
#define INF 1<<20

struct edge{
	int to;
	int cost;
	edge() {};
	edge(int a, int b) {
		to = a;
		cost = b;
	}
};

struct Node {
	int pos;
	int cost;
	Node() {};
	Node(int a, int b) {
		pos = a;
		cost = b;
	}
	bool operator <(const Node& rhs) const {
		return cost > rhs.cost;
	}
};

void dijkistra(int st, int TO,int V,vector<vector<edge> > graph) {
	priority_queue<Node> q;
	vector<int> d(V);
	for (int i = 0;i < V;i++) {
		d[i] = INF;
	}
	d[st] = 0;
	q.push(Node(st, 0));
	while (!q.empty()) {
		Node s = q.top(); q.pop();
		int pos = s.pos;
		for (int i = 0;i < graph[pos].size();i++) {
			int to = graph[pos][i].to;
			int cost = graph[pos][i].cost;
			if (d[pos] + cost < d[to]) {
				d[to] = d[pos] + cost;
				q.push(Node(to, d[to]));
			}

		}
	}
	cout << d[TO] << endl;
}
int partition(int A[],int p, int r) {
	int x = A[r];
	int i = p - 1;
	for (int j = p;j < r;j++) {
		if (x >= A[j]) {
			i = i + 1;
			swap(A[i], A[j]);
		}
	}
		swap(A[i + 1], A[r]);
		return i + 1;
}
void quicksort(int A[], int p, int r) {
	if (p < r) {
		int q = partition(A, p, r);
		quicksort(A, p, q-1);
		quicksort(A, q + 1, r);
	}
}

int getNumberOfCoin(int C[],int n,int m) {
	int T[50000];
	for (int j = 0;j <= n;j++) {
		T[j] = INF;
	}
	T[0] = 0;
	for (int i = 0;i < m;i++) {
		for (int j = 0;j <= n;j++) {
			if (j - C[i] >=0  ) {
				T[j] = min(T[j], T[j - C[i]] + 1);
			}
		}
	}
	return T[n];
}
int knapsack(int w, int n,int* v,int* ww) {
	int W[101][10001];
		for (int j = 0;j <= w;j++) {
			W[0][j] = 0;
		}
	for (int i = 0;i < n;i++) {
		for (int k = 0;k < n;k++){
			for (int j = 0;j <= w;j++) {
				if (j - ww[k] < 0) {
					W[i + 1][j] = W[i][j];
				}
				if (j - ww[i] >= 0) {
					W[i + 1][j] = max(W[i][j], W[i][j - ww[k]] + v[k]);

				}
			}
		}
	}
	return W[n][w];
}
int fib(int n) {
	vector<int> v(n+1);
	v[0] = 1;
	v[1] = 1;
	for (int i = 2;i < n+1;i++) {
		v[i] = v[i - 2] + v[i - 1];
	}
	return v[n];
}
int isPrime(int x) {
	if (x <= 1) return false;
	if (x>2 && x % 2 == 0) return false;
	for (int i = 2;i <= sqrt(x);i++) {
		if (x%i == 0) {
			return false;
		}
	}
	if (x == 2) return true;
	return true;
}
vector<long long int> a;
void Prime(int x) {
	vector<int> prime(x+1,1);
	int num = 2;
	while (num <= sqrt(x)) {
		a.push_back(num);
		for (int i = 2;i <= x / num;i++) {
			prime[num*i] = 0;
		}
		num++;
		while (prime[num] == 0)
			num++;
	}
	int count = 0;
	for (int i = 2;i < x + 1;i++) {
		if (prime[i] == 1) count++;
	}
	
}
int main() {
	double a;
	while (cin >> a) {
		double ans[10];
		ans[0] = a;
		double sum = a;
		for (int i = 1;i < 10;i++) {
			if (i % 2 == 0) ans[i] = ans[i - 1] / 3;
			else ans[i] = 2 * ans[i - 1];
			sum += ans[i];
		}
		cout <<setprecision(9) <<sum << endl;
	}
	
	}