Problem:


数列

次のように定義されている数列があります。

すべての偶数番目の項は一つ前の項に 2 を掛けたものと等しい数である。

すべての奇数番目の項は一つ前の項を 3 で割ったものと等しい数である。

この数列の初項 a を読み込み、初項から第 10 項までの和 s(10) を出力するプログラムを作成してください。

Input

入力は複数のテストケースからなります。各テストケースとして、数列の初項を表す実数 a (1.0 ≤ a ≤ 10.0) が１行に与えられます。

テストケースの数は 50 を超えません。

Output

テストケースごとに s(10) を１行に出力します。

出力は0.000001以下の誤差を含んでもよい。

Sample Input

1.0
2.0
3.0

Output for the Sample Input

7.81481481
15.62962963
23.44444444



Sample input:
1.0
2.0
3.0


Sample output:
7.81481481
15.62962963
23.44444444

Submission status: Wrong Answer

Solution code:
a = input()
sum = 0

for i in range(10):
	sum += a
	a = a * 2 if i % 2 == 0 else a / 3

print sum

Submission status: Wrong Answer

Solution code:
x = float(input())
s=x
for i in range(9):
	if i % 2 == 0:
		s = s*2
		x+=s
	if i % 2 == 1:
		s = s/3
		x+=s
print(x)

Submission status: Wrong Answer

Solution code:
import sys
for x in sys.stdin.readlines():
    a=float(x.rstrip())
    s=[0.0]*10
    for i in range(1,10):
        if i%2 != 0: s[i]=s[i-1]*2.0
        else:        s[i]=s[i-1]/3.0
    print sum(s)

Submission status: Accepted

Solution code:
while 1:
    try:print(float(input())*211/27)
    except:break

Submission status: Accepted

Solution code:
while True:
    try:
        n = float(raw_input())
        d = [0]*10
        d[0] = n
        for i in xrange(1,10):
            if i%2 == 0: d[i] = d[i-1]/3
            else: d[i] = d[i-1]*2
        print round(sum(d),8)
    except:
        break

Submission status: Accepted

Solution code:
while True:
    try:
        n = float(raw_input())
        d,c = n,n
        for i in xrange(1,10):
            if i%2 == 0: c = c/3
            else: c = c*2
            d += c
        print round(d,8)
    except:
        break

Submission status: Accepted

Solution code:
import sys
for s in sys.stdin:
    d = c = float(s)
    for i in xrange(1,10):
        if i%2 == 0: c = c/3
        else: c = c*2
        d += c
    print round(d,8)

Submission status: Accepted

Solution code:
import sys
f = sys.stdin

for a in f:
    a = float(a)
    s = a
    for i in range(2, 10 + 1):
        a = a / 3 if i % 2 else a * 2
        s += a
    print('{:.8f}'.format(s))

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-

def solve(a):
	s = 0
	for _ in xrange(1, 11):
		s += a
		if _ % 2 == 1:
			a = a * 2.0
		else:
			a = a / 3.0
	print s

	
while True:
	try :
		a = float(raw_input())
		solve(a)
	except:
		break

Submission status: Accepted

Solution code:
while True:
    try:
        f = float(input())
    except:
        break
    l = [0] * 11
    l[1] = f
    for i in range(2,11):
        if i % 2 == 0:
            l[i] = l[i-1] * 2
        else:
            l[i] = l[i-1] / 3

    print(sum(l))

Submission status: Accepted

Solution code:
while True:
    try:
        a = float(raw_input())
    except EOFError:
        break
    
    ls = [a]
    for i in range(9):
        if i%2 == 0:
            ls.append(ls[-1]*2.0)
        elif i%2 == 1:
            ls.append(ls[-1]/3.0)
    print sum(ls)

Submission status: Accepted

Solution code:
while True:
    try:
        a = float(raw_input())
    except:
        break
    ans = a
    for i in range(2, 11):
        if i % 2 == 0:
            a = a * 2
        else:
            a = a / 3
        ans += a
    print ans

Submission status: Accepted

Solution code:
def get_input():
    while True:
        try:
            yield ''.join(raw_input())
        except EOFError:
            break

for a in list(get_input()):
	a = float(a)
	sum = 0

	for i in range(10):
		sum += a
		a = a * 2 if i % 2 == 0 else a / 3

	print sum

Submission status: Accepted

Solution code:
while True:
    try:
        a = float(raw_input())
        ans = 0
        for i in range(10):
            n = i+1
            if i == 0:
                ans += a
            elif n % 2 == 0:
                a *= 2
                ans += a
            else:
                a /= 3
                ans += a
        else:
            print ans
    except EOFError:
        break

Submission status: Accepted

Solution code:
import sys
for line in sys.stdin.readlines():
  i = float(line)
  s = 0
  for x in range(5):
    s += i
    i *= 2
    s += i
    i /= 3
  print(s)

Submission status: Accepted

Solution code:
from math import *
PI = 3.1415926535898
ans = 7.81481481
while True:
    try:
        n = input()
        print n*ans
    except EOFError:
        break

Submission status: Accepted

Solution code:
while 1:
    try:
        a=s=float(raw_input())
        for i in range(2,11):
            if i%2==0:
                a*=2.0
                s+=a
            else:
                a/=3.0
                s+=a
        print s
    except:
        break

Submission status: Accepted

Solution code:
if __name__=="__main__":
    while True:
        try:
            ans=0.0
            term=float(raw_input())
            for i in range(1,11):
                ans+=term
                if i%2 :
                    term*=2
                else :
                    term/=3
            print ans
        except EOFError:break

Submission status: Accepted

Solution code:
def sequence(x):
	A=[x]
	for i in range(1,10):
		if i%2:
			A.append(A[i-1]*2)
		else:
			A.append(A[i-1]/3)
	return sum(A)

while True:
	try:
		x=float(input())
		print(sequence(x))
	except EOFError:
		break

Submission status: Accepted

Solution code:
import sys
 
for s in sys.stdin:
    a = float(s)
    r = a
    for i in range(2, 11):
        if i%2 == 0:
            a *= 2
            r += a
        else:
            a /= 3
            r += a
    print r

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys

for line in sys.stdin:
    A = []
    A.append(float(line))
    sum = 0.0
    for i in range(1, 10):
        if i % 2:
            A.append(A[i-1]*2)
        else:
            A.append(A[i-1]/3)
    for i in range(10):
        sum += A[i]
    print sum

Submission status: Accepted

Solution code:
while True:
    try:
        print(float(input()) * 211 / 27)
    except:
        break

Submission status: Accepted

Solution code:
while 1:
 try:print(float(input())*211/27)
 except:break

Submission status: Accepted

Solution code:
while True:
    try:
        a = float(input())
        Sum = 0
        retu = 3 * a
        for i in range(10):
            if i % 2 == 0:
                retu = retu / 3
            else:
                retu = retu * 2
            Sum += retu
        print(Sum)
    except EOFError:
        break

Submission status: Accepted

Solution code:
import sys

for line in sys.stdin:
    ans = [float(line.strip())]
    for i in range(1, 10):
        if (i+1) % 2 == 0: ans += [ans[i-1]*2]
        else: ans += [ans[i-1]/3]
    print(sum(ans))

Submission status: Accepted

Solution code:
while 1:
    try:n=float(input())
    except:break
    s=n
    for i in range(9):
        n=n/3 if i%2 else n*2
        s+=n
    print(s)

Submission status: Accepted

Solution code:
a = []
while True:
    try:
        a.append(float(input()))
    except EOFError:
        break

for i in range(len(a)):
    count = 0
    x = a[i]
    sum = a[i]
    for j in range(9):
        if count % 2 == 0:
            x *= 2
            sum += x
        else:
            x /= 3
            sum += x
        count += 1
    print(sum)

Submission status: Accepted

Solution code:
while True:
    try:
        a0 = float(input().strip())
        s = a0
        for i in range(1,10):
            if i % 2 == 1:
                a1 = a0*2
            else:
                a1 = a0/3
            s += a1
            a0 = a1
        print(s)

    except EOFError:
        break

Submission status: Accepted

Solution code:
while True:
    try:
        N = float(input())
    except EOFError:
        break
    ans = N
    for i in range(9):
        if i % 2 == 0:
            N *= 2.0
        else:
            N /= 3.0
        ans += N
    print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys
import os

for s in sys.stdin:
    A = [0]
    v = float(s)
    A.append(v)

    for i in range(2, 10+1):
        if i % 2 == 0:
            v = 2 * A[i-1]
            A.append(v)
        else:
            v = A[i-1] / 3
            A.append(v)
    print(sum(A))

Submission status: Accepted

Solution code:
from collections import deque
while True :
    try : 
        s = deque()
        s.append(float(input()))
        for _ in range(9) :
            if _ % 2 == 0 : s.append(s[_]*2)
            else : s.append(s[_]/3)
        print(sum(s))
    except : 
        break

Submission status: Accepted

Solution code:
from sys import stdin
def an(n ,a):
    if n == 1:
        return a
    if n % 2 == 0:
        return an(n - 1, a) * 2
    else:
        return an(n - 1, a) / 3
    
for line in stdin:
    a = float(line)
    print (sum([an(n,a) for n in range(1,11)]))

Submission status: Accepted

Solution code:
import sys


def solve(n):
    sum = n
    current_value = n
    for i in range(2, 11):
        if i%2 == 0:
            next_value = current_value * 2.0
        else:
            next_value = current_value / 3.0
        sum += next_value
        current_value = next_value
    return sum


if __name__ == '__main__':
    # ??????????????\?????¨???????????????
    for line in sys.stdin:
        n = float(line.strip())
        result = solve(n)
        print('{:.8f}'.format(result))

Submission status: Accepted

Solution code:
import sys
for a in sys.stdin:
    if a == "\n":
        break
    s = [0 for i in range(10)]
    s[0] = float(a)
    for i in range(1, 10):
        if i % 2:
            s[i] = s[i-1] * 2
        else:
            s[i] = s[i-1] / 3
    print(sum(s))

Submission status: Accepted

Solution code:
# Aizu Problem 0055: Sequence
#
import sys, math, os, bisect

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


for line in sys.stdin:
    a = float(line)
    S = a
    for k in range(9):
        if k % 2 == 0:
            a *= 2
        else:
            a /= 3
        S += a
    print("%.8f" % S)

Submission status: Accepted

Solution code:
while True:
    try:
        a = float(input())
    except:
        break
    total = a
    for i in range(2, 11):
        tmp = a / 3 if i % 2 else a * 2
        total += tmp
        a = tmp
    print(total)

Submission status: Accepted

Solution code:
while True:
    try:
        a = float(input())
    except:
        break
    total = a
    for i in range(2, 11):
        tmp = (a / 3) * (i % 2) + (a * 2) * (i % 2 == 0)
        total += tmp
        a = tmp
    print(total)

Submission status: Accepted

Solution code:
while True:
    try:
        a = float(input())
        s = a
        for i in range(9):
            if i%2 == 0:
                a *= 2
            else:
                a /= 3
            s += a
        print(s)
    except:
        break

Submission status: Accepted

Solution code:
def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

N = list(get_input())
for l in range(len(N)):
    a = float(N[l])
    s = a
    for i in range(2,11):
        if i % 2 == 0:
            a *= 2.0
            s += a
        else:
            a /= 3.0
            s += a
    print(s)

Submission status: Accepted

Solution code:
import sys
for e in sys.stdin:
 a=float(e)
 t=[a,
 a*2,
 a*2/3,
 a*2/3*2,
 a*2/3*2/3,
 a*2/3*2/3*2,
 a*2/3*2/3*2/3,
 a*2/3*2/3*2/3*2,
 a*2/3*2/3*2/3*2/3,
 a*2/3*2/3*2/3*2/3*2]
 print(sum(t))

Submission status: Accepted

Solution code:
import sys
for e in sys.stdin:print(float(e)*211/27)

Submission status: Accepted

Solution code:
while True:
  try:
    a1 = float(input())
    lst = [a1]
    for i in range(2,11):
      if i % 2:
        a1 /= 3
        lst.append(a1)
      else:
        a1 *= 2
        lst.append(a1)

    print(sum(lst))

  except EOFError:
    break

Submission status: Accepted

Solution code:
from decimal import *
import sys
getcontext().prec=10
[print(j) for j in [Decimal(i)*Decimal("633")/Decimal("81") for i in [l for l in sys.stdin]]]

Submission status: Accepted

Solution code:
# AOJ 0055: Sequence
# Python3 2018.6.15 bal4u

import sys
for a in sys.stdin:
    print(7.81481481481481 * float(a))

Submission status: Accepted

Solution code:
while 1:
	try:
		x = float(input())
	except:
		break
	s=x
	for i in range(9):
		if i % 2 == 0:
			s = s*2
			x+=s
		if i % 2 == 1:
			s = s/3
			x+=s
	print(x)

Submission status: Accepted

Solution code:
import sys
for n in (float(l) for l in sys.stdin.readlines()):
    ans = n
    for i in range(2, 11):
        if i%2 == 0:
            n *= 2
        else:
            n /= 3
        ans += n
    print(ans)

Submission status: Accepted

Solution code:
import sys
def S(a,r,n):
    if r==1:return n*a
    a,r,n=map(float,[a,r,n])
    return a*(1.0-r**(n))/(1.0-r)
for line in sys.stdin.readlines():
    n=float(line.strip())
    print S(n,2.0/3.0,5)+S(n*2,2.0/3.0,5)

Submission status: Accepted

Solution code:

import sys


def solv(i):
    r = 0.0
    j = 0
    for k in seq(i):
        j += 1
        if 10 < j:
            break
        else:
            r += k
    return r


def seq(init):
    s = []
    s.append(init)
    yield(init)
    while True:
        x = s[-1] * 2.0
        s.append(x)
        yield x
        y = s[-1] / 3.0
        s.append(y)
        yield y


for line in sys.stdin:
    i = float(line)
    print solv(i)

Submission status: Accepted

Solution code:
import sys
for x in sys.stdin.readlines():
    a=float(x.rstrip())
    s=[0.0]*10
    s[0]=a
    for i in range(1,10):
        if i%2 != 0: s[i]=s[i-1]*2.0
        else:        s[i]=s[i-1]/3.0
    print sum(s)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, absolute_import, print_function,
                        unicode_literals)
from sys import stdin

for line in stdin:
    s = a = float(line)
    for i in xrange(2, 11):
        if i % 2 == 0:
            a *= 2.0
        else:
            a /= 3.0
        s += a
    print(s)

Submission status: Accepted

Solution code:
import sys

for s in sys.stdin:
    a = float(s)
    r = a
    for i in range(2, 11):
        if i%2 == 0:
            a *= 2
            r += a
        else:
            a /= 3
            r += a
    print r

Submission status: Accepted

Solution code:
import sys
for x in sys.stdin:
    s=0
    a=float(x)
    for i in range(10):
        s+=a
        if i%2==0: a*=2
        else: a/=3
    print s

Submission status: Accepted

Solution code:
import sys
for x in sys.stdin:
    s=a=float(x)
    for i in range(9):
        if i%2==0: a*=2
        else: a/=3
        s+=a
    print s

Submission status: Accepted

Solution code:
import sys
for x in sys.stdin:
    a=float(x)
    s=a
    for i in range(9):
        if i%2: a/=3
        else: a*=2
        s+=a
    print s

Submission status: Accepted

Solution code:
while True:
    try:
        a = float(raw_input())
        sum = a
        for i in range(2,11):
            if i % 2 == 0:
                a *= 2.0
                sum += a
            else:
                a /= 3.0
                sum += a
        print sum
    except:
        break

Submission status: Accepted

Solution code:
while True:
    try:
        a = sum = float(raw_input())
        for i in range(2,11):
            if i % 2 == 0:
                a *= 2.0
                sum += a
            else:
                a /= 3.0
                sum += a
        print sum
    except:
        break

Submission status: Accepted

Solution code:
try:
    while True:
        sm = a = float(raw_input())
        for i in range(9):
            if i % 2 == 0:
                a *= 2
            else:
                a /= 3
            sm += a
        print sm
except EOFError:
    pass

Submission status: Accepted

Solution code:
while True:
    try:
        num = float(raw_input())
        s = num
        tmp = num
        for i in xrange(9):
            tmp = tmp * 2 if i % 2 == 0 else tmp / 3
            s += tmp
        print s
    except:
        break

Submission status: Accepted

Solution code:
while 1:
    try:
        n = input()
    except EOFError:
        break
    ret = n
    for i in xrange(9):
        if i % 2:
            n /= 3
        else:
            n *= 2
        ret += n
    print ret

Submission status: Accepted

Solution code:
while True:
    try:
        s = input()
    except EOFError:
        break

    a = float(s)
    x = 0
    for i in range(5):
        x += a
        a *= 2
        x += a
        a /= 3
    print(x)

Submission status: Accepted

Solution code:
while True:
    try:
        a = float(input())
    except:
        break
    S = [a]
    for i in range(2,11):
        if i%2==0:
            Si = S[i-2] * 2
            S.append(Si)
        if i%2==1:
            Si = S[i-2] / 3
            S.append(Si)
    print(f'{sum(S):.6f}')

Submission status: Accepted

Solution code:
while True :
    try :
        a = float(input())
    except EOFError :
        break
    
    S = []
    S.append(0)
    S.append(a)
    for i in range(2, 11) :
        if i % 2 == 0 :
            S.append(S[i-1] * 2)
        else :
            S.append(S[i-1] / 3)
    print(sum(S))

Submission status: Accepted

Solution code:
import sys
readlines = sys.stdin.readlines
write = sys.stdout.write
def solve():
    for line in readlines():
        a = float(line)
        s = 0
        for i in range(10):
            s += a
            if i % 2:
                a /= 3
            else:
                a *= 2
        write("%.16f\n" % s)
solve()

Submission status: Accepted

Solution code:
while True:
    try:
        a1 = float(input())
        ans = beforeNum = a1
        for i in range(2,11):
            if i % 2 == 0:
                beforeNum *= 2
            else:
                beforeNum /= 3
            ans += beforeNum             
        print(ans)
    except:
        break

Submission status: Accepted

Solution code:
while True:
    try:
        n=float(input())
    except:
        break
    num=2
    tmp=round(n,9)
    total=round(n,9)
    while num<=10:
        if num%2==0:
            tmp=round(tmp*2,9)
        else:
            tmp=round(tmp/3,9)
        total+=tmp
        num+=1
    print(round(total,8))

Submission status: Accepted

Solution code:
while True:
    try:
        f = float(input())
    except:
        break

    L = [None]*10
    L[0] = f
    for i in range(1,10):
        if i % 2 > 0:
            L[i] = L[i-1] *2
        else:
            L[i] = L[i-1] /3
    print("{:.8f}".format(sum(L)))

Submission status: Accepted

Solution code:
while True:
    try:
        a = []
        a.append(float(input()))
    except:
        break
    for i in range(2,11):
        a.append(a[i - 2]*2 if i%2==0 else a[i-2]/3)
    print(sum(a))

Submission status: Accepted

Solution code:
while 1:
    try:
        be = float(input())
        sum = be
        for i in range(2, 11):
            if i % 2 == 0:
                be *= 2
                sum += be

            if i % 2 == 1:
                be /= 3
                sum += be
        print(sum)
    except:
        break

Submission status: Accepted

Solution code:
import sys

for line in sys.stdin:
    a = float(line)
    S = a

    for i in range(2, 11):

        if i % 2 == 0:
            a *= 2
        else:
            a /= 3

        S += a

    print(S)

Submission status: Accepted

Solution code:
# coding=utf-8

###
### for python program
###

import sys
import math

# math class
class mymath:
    ### pi
    pi = 3.14159265358979323846264338

    ### Prime Number
    def pnum_eratosthenes(self, n):
        ptable = [0 for i in range(n+1)]
        plist = []

        for i in range(2, n+1):
            if ptable[i]==0:
                plist.append(i)
                for j in range(i+i, n+1, i):
                    ptable[j] = 1
        return plist

    ### GCD
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)

    ### LCM
    def lcm(self, a, b):
        return (a*b)//self.gcd(a,b)

    ### Mat Multiplication
    def mul(self, A, B):
        ans = []
        for a in A:
            c = 0
            for j, row in enumerate(a):
                c += row*B[j]
            ans.append(c)
        return ans

mymath = mymath()

### output class
class output:
    ### list
    def list(self, l):
        l = list(l)
        #print(" ", end="")
        for i, num in enumerate(l):
            print(num, end="")
            if i != len(l)-1:
                print(" ", end="")
        print()

output = output()

### input sample
#i = input()
#N = int(input())
#A, B, C = [x for x in input().split()]
#N, K = [int(x) for x in input().split()]
#inlist = [int(w) for w in input().split()]

#R = float(input())
#A.append(list(map(int,input().split())))

#for line in sys.stdin.readlines():
#    x, y = [int(temp) for temp in line.split()]

#abc list
#abc = [chr(ord('a') + i) for i in range(26)]

### output sample
# print("{0} {1} {2:.5f}".format(A//B, A%B, A/B))
# print("{0:.6f} {1:.6f}".format(R*R*math.pi,R*2*math.pi))
# print(" {}".format(i), end="")

# def printA(A):
#     for i, n in enumerate(A):
#         print(n, end='')
#         if i != N-1:
#             print(' ', end='')
#     print()

# リスト内包表記 ifあり
# [x-k if x != 0 else x for x in C]

# ソート
# N = N.sort()

# 10000個の素数リスト
# P = mymath.pnum_eratosthenes(105000)

def is_integer(n):
    try:
        float(n)
    except ValueError:
        return False
    else:
        return float(n).is_integer()

def dist(A, B):
    d = 0
    for i in range(len(A)):
        d += (A[i]-B[i])**2            
    d = d**(1/2)
    return d

def get_input():
    N = []
    while True:
        try:
            #N.append(input())
            #N.append(int(input()))
            N.append(float(input()))
        except EOFError:
            break
    return N

N = get_input()

for ans in N:
    pre = ans
    for i in range(2,11):
        if i % 2 == 0:
            pre = (pre*2)
            ans += pre
        else:
            pre = (pre/3)
            ans += pre
    print(ans)

Submission status: Accepted

Solution code:
while 1:
    try:
        print(7.81481481*float(input()))
    except:break

Submission status: Accepted

Solution code:
while 1:
    try:
        n=[0]*10
        n[0]=float(input())
        for i in range(1,10):
            if i%2==1:
                n[i]=n[i-1]*2
            elif i%2==0:
                n[i]=n[i-1]/3
        print(f'{sum(n):.8f}')
    except:break

Submission status: Accepted

Solution code:
while(1):
    try:
        a = float(input())
        b = []
        for i in range(10):
            if i == 0:
                b.append(a)
            else:
                if i%2 == 0:
                    a = a/3
                    b.append(a)
                else:
                    a = a*2
                    b.append(a)
        s = sum(b)
        print("{:.8f}".format(s))
    except EOFError:
        break

Submission status: Accepted

Solution code:
while 1:
    try:
        n = float(input())
    except:
        break

    ans = n

    for i in range(2, 11):
        if i % 2 == 0:
            tmp = n * 2
        else:
            tmp = n / 3
        ans += tmp
        n = tmp

    print(ans)

Submission status: Accepted

Solution code:
while True:
    try: a = float(input())
    except: break
    ans = a
    for i in range(9):
        a = a*2*((i+1)&1)+a/3*(i&1)
        ans += a
    print("%.8f"%ans)

Submission status: Accepted

Solution code:
while True:
    num_list = []
    try:num_list.append(float(input()))
    except:break
    for i in range(1,10):
        #奇数の場合だけど0スタートなので偶数扱い
        if i % 2 == 1:
            num_list.append(num_list[i-1] * 2)
        #偶数の場合だけど0スタートなので奇数扱い
        else:
            num_list.append(num_list[i-1] / 3)
    print(sum(num_list))

Submission status: Runtime Error

Solution code:
import sys
for e in sys.stdin:
 t=[a,
 a*2,
 a*2/3,
 a*2/3*2,
 a*2/3*2/3,
 a*2/3*2/3*2,
 a*2/3*2/3*2/3,
 a*2/3*2/3*2/3*2,
 a*2/3*2/3*2/3*2/3,
 a*2/3*2/3*2/3*2/3*2]
 print(sum(t))

Submission status: Runtime Error

Solution code:
while 1:
	x = float(input())
	s=x
	for i in range(9):
		if i % 2 == 0:
			s = s*2
			x+=s
		if i % 2 == 1:
			s = s/3
			x+=s
	print(x)

Submission status: Runtime Error

Solution code:
while True:
    a = float(raw_input())
    sum = a
    for i in range(2,11):
        if i % 2 == 0:
            a *= 2.0
            sum += a
        else:
            a /= 3.0
            sum += a
    print sum