Problem:
 Score : 200 points    Problem Statement Takahashi received otoshidama (New Year's money gifts) from N of his relatives.  You are given N values x_1, x_2, ..., x_N and N strings u_1, u_2, ..., u_N as input. Each string u_i is either JPY or BTC , and x_i and u_i represent the content of the otoshidama from the i -th relative.  For example, if x_1 =  10000 and u_1 =  JPY , the otoshidama from the first relative is 10000 Japanese yen; if x_2 =  0.10000000 and u_2 =  BTC , the otoshidama from the second relative is 0.1 bitcoins.  If we convert the bitcoins into yen at the rate of 380000.0 JPY per 1.0 BTC, how much are the gifts worth in total?      Constraints  2 \leq N \leq 10  u_i =  JPY or BTC .  If u_i =  JPY , x_i is an integer such that 1 \leq x_i \leq 10^8 .  If u_i =  BTC , x_i is a decimal with 8 decimal digits, such that 0.00000001 \leq x_i \leq 100.00000000 .         Input Input is given from Standard Input in the following format:  N  x_1  u_1  x_2  u_2  :  x_N  u_N       Output If the gifts are worth Y yen in total, print the value Y (not necessarily an integer).  Output will be judged correct when the absolute or relative error from the judge's output is at most 10^{-5} .        Sample Input 1 2
10000 JPY
0.10000000 BTC      Sample Output 1 48000.0  The otoshidama from the first relative is 10000 yen. The otoshidama from the second relative is 0.1 bitcoins, which is worth 38000.0 yen if converted at the rate of 380000.0 JPY per 1.0 BTC. The sum of these is 48000.0 yen.  Outputs such as 48000 and 48000.1 will also be judged correct.       Sample Input 2 3
100000000 JPY
100.00000000 BTC
0.00000001 BTC      Sample Output 2 138000000.0038  In this case, outputs such as 138001000 and 1.38e8 will also be judged correct.

Solution (Python):
n = int(input())
t = 0
for i in range(n):
    x, v = map(str, input().split())
    if v == "JPY":
        t += float(x)
    else:
        t += float(x) * 380000
print(t)

Solution (Python):
N = int(input())

ans = 0
for _ in range(N):
    i = input().split()

    if i[1] == 'BTC':
        ans += float(i[0]) * 380000
    else:
        ans += float(i[0])

print(ans)

Solution (Python):
N = int(input())
sum = 0.0
for i in range(N):
    x,u = input().split()
    x = float(x)
    if u == 'BTC':
        x *= 380000.0
    sum += x
print(sum)

Solution (Python):
S = int(input())

list = []
for _ in range(S):
  num, currency = input().split()
  d = {num: currency}
  list.append(d)

sum = 0
for l in list:
  for k, v in l.items():
    if v == 'JPY':
      sum += int(k)
    else:
      k = float(k)
      sum += k * 380000
print(sum)

Solution (Python):
n = int(input())
ans = 0
for i in range(n):
    x,u = input().split()
    if u == "BTC":
        ans += float(x)*380000.0
    else:
        ans += float(x)
print(ans)

Solution (Python):
n = int(input())
ans = 0
for i in range(n):
    x, u = input().split()
    if (u == 'JPY'):
        ans += float(x)
    else:
        ans += float(x) * 380000
print(ans)

Solution (Python):
n = int(input())
xu = [[i for i in input().split()] for i in range(n)]
ans = 0
for i in range(n):
    if xu[i][1]=='JPY':
        ans += float(xu[i][0])
    else:
        ans += float(xu[i][0])*380000
print(ans)

Solution (Python):
n = int(input())

val = 0.0
for _ in range(n):
  x, u = input().split()
  x=float(x)
  if u == 'JPY':
    val += x
  else:
    val += x * 380000

print(val)

Solution (Python):
n = int(input())
t = [list(input().split()) for _ in range(n)]
BY = 380000
ans = 0

for i in range(n):
    if t[i][1] == 'JPY':
        ans += int(t[i][0])
    else:
        ans += float(t[i][0])*BY

print(ans)

Solution (Python):
n = int(input())
ans = 0
for i in range(n):
    x = input().split()
    if x[1] == "JPY":
        ans += int(x[0])
    else:
        ans += float(x[0])*380000
        
print(ans)

Solution (Python):
N = int(input())
sum = 0.0
for i in range(N):
  K = input().split()
  if K[1] == "BTC":
    sum += float(K[0])*380000
  else:
    sum += int(K[0])
print(sum)

Solution (Python):
n=int(input())
ans=0
for i in range(n):
  a,b=map(str,input().split())
  if b=='JPY':
    ans+=int(a)
  else:
    ans+=float(a)*380000
print(ans)

Solution (Python):


n = int(input())
sum = 0
for i in range(n):
    x, u = input().split()
    if u == "BTC":
        sum += float(x) * 380000
    else:
        sum += float(x)

print(sum)

Solution (Python):
n=int(input())

total=0.0
for i in range(n):
  a,u=input().split()
  a=float(a)
  if u=='JPY':
    total+=a
  else:
    total+=a*380000
print(total)

Solution (Python):
n = int(input())
y = 0
for i in range(n):
    x,u = [j for j in(input().split())]
    if u=='JPY':
        y += int(x)
    else:
        y += 380000*float(x)
print(y)

Solution (Python):
N = int(input())
ans = 0
for i in range(N):
  x,u = input().split()
  x = float(x)
  if u == "BTC":
    x *= 380000
  ans += x
print(ans)

Solution (Python):
n=int(input())
l=[[],[]]
for i in range(n):
        a,b=map(str,input().split())
        if b=='JPY':
                l[0].append(float(a))
        else:
                l[1].append(float(a)) 
ans=0
for i in l[0]:
        ans+=i
for j in l[1]:
        ans+=j*380000
print(ans)

Solution (Python):
n = int(input())
XU = []
for _ in [0]*n:
    x, u = input().split()
    XU.append([float(x), u])
ans = 0
for x, u in XU:
    if u == 'JPY':
        ans += x
    else:
        ans += 380000 * x
print(ans)

Solution (Python):
def solve():
    n = int(input())
    xu = [list(input().split()) for _ in range(n)]
    total = 0
    for x, u in xu:
        if u == "BTC":
            total += float(x) * 380000
        else:
            total += float(x)
    return total


if __name__ == "__main__":
    print(solve())

Solution (Python):
import math
import copy

inputa = input().split()



a = int(inputa[0])










inputList=[]
for i in range(a):
    inputNum = input().split()
    
    inputList.append(inputNum)






sum = 0
btc2jpy = 380000.0
for i in range(a):
    tmp = float(inputList[i][0])
    if str(inputList[i][1]) == "JPY":
        sum += tmp
    else:
        sum += btc2jpy * tmp

print(sum)

Solution (Python):
n=int(input())
c=0
for i in range(n):
    y=input().split()
    if y[1]=="JPY":
        c+=float(y[0])
    else:
        c+=float(y[0])*380000.0

print(c)

Solution (Python):
N = int(input())

ans = 0
for i in range(N):
  x, u = input().split()
  if u == "JPY": ans += float(x)
  else: ans += float(x) * 380000.0
print (ans)

Solution (Python):
sum = 0.0
n = int(input())
for i in range(n):
    x, u = map(str, input().split())
    if u == 'JPY':
        sum += int(x)
    elif u == 'BTC':
        sum += 380000.0 * float(x)
print(sum)

Solution (Python):
n = int(input())
sum = 0
for i in range(n):
  x, u = input().split()
  if u == "JPY":
    sum += float(x)
  else:
    sum += float(x)*380000
print(sum)

Solution (Python):


n = int(input())
values = [input().split() for i in range(n)]
print(sum([float(value) * {'JPY':1,'BTC':38e4}[unit]for value,unit in values]))

Solution (Python):
N = int(input())
list = []
for i in range(N):
    a,b=input().split()
    list.append((float(a), b))

ans = 0

for j in range(N):
    if list[j][1] == "JPY":
        ans += list[j][0]
    else:
        ans += 380000 * list[j][0]

print(ans)

Solution (Python):
n = int(input())
x = []
y = []
for i in range(n):
    a, b = map(str, input().split(' '))
    if b == 'BTC':
        x.append(float(a)*380000)
    else:
        x.append(float(a))
print(sum(x))

Solution (Python):
n = int(input())
xu = list(list(map(str,input().split())) for _ in range(n))

answer = 0
for i in range(n):
    if xu[i][1] == 'JPY':
        answer += int(xu[i][0])
    else:
        answer += float(xu[i][0])*380000

print(answer)

Solution (Python):
n = int(input())
sum = 0
for i in range(n):
    s, t = map(str, input().split())
    if t == "JPY":
        sum += float(s)
    else:
        sum += float(s)*380000
print(sum)

Solution (Python):
n = int(input())
s = 0
for i in range(n):
    x, u = input().split()
    if u == "JPY":
        s += int(x)
    else:
        s += float(x) * 380000
print(s)

Solution (Python):
n = int(input())
ans = 0
for i in range(n):
    x,u = input().split()
    if u == "BTC":
        x = float(x)*380000
    ans +=float(x)
print(ans)

Solution (Python):
n = int(input())
x = [list(input().split()) for i in range(n)]
ans = 0
for i in x:
  if i[1] == 'JPY':
    ans += int(i[0])
  else:
    ans += float(i[0])*380000.0
print(ans)

Solution (Python):
n = int(input())
ll = [input().split() for _ in [0]*n]
ans = 0.0
for l in ll:
  if l[1] == 'BTC':
    ans += float(l[0])*380000
  else:
    ans += float(l[0])
print(ans)

Solution (Python):
n = int(input())
x = [list(input().split()) for _ in range(n)]

ans = 0.0
for i in range(n):
    ans += float(x[i][0]) if x[i][1] == 'JPY' else float(x[i][0]) * 380000.0
print(ans)

Solution (Python):
n = int(input())

x = [input().split() for _ in range(n)]

cnt = 0.0
for i in range(n):
    if x[i][1] == "JPY":
        cnt += int(x[i][0])
    else:
        cnt += float(x[i][0]) * 380000

print(cnt)

Solution (Python):
coin = {
    'JPY': 0,
    'BTC': 0
}
for _ in range(int(input())):
    x, u = input().split(' ')
    coin[u] += float(x)
print(coin['JPY'] + coin['BTC'] * 380000)

Solution (Python):



N = int(input())


ans = 0
for i in range(N):
    x, u = map(str, input().split())
    if u == 'JPY':
        ans += int(x)
    if u == 'BTC':
        ans += 380000.0 * float(x)


print(ans)

Solution (Python):
n=int(input())
rate=380000.0
ans=0.0

for i in range(n):
  x,u = input().split()
  x = float(x)
  ans += x * rate if u == "BTC" else x


print("{:.11f}".format(ans))

Solution (Python):
n = int(input())
x = []
u = []

for i in range(n):
    temp1, temp2 = input().split()
    x.append(float(temp1))
    u.append(temp2)

total = 0

for i in range(n):
    if u[i] == 'JPY':
        total += x[i]
    else:
        total += x[i] * 380000

print(total)

Solution (Python):
n = int(input())
ans = 0
for i in range(n):
  x,u = input().split()
  if u == "JPY":
    ans+=int(x)
  else:
    ans += float(x)*380000
print(ans)

Solution (Python):
n=int(input())
ans=0
for _ in range(n):
    x,v=input().split()
    if v=="BTC":
        ans+=float(x)*380000
    else:
        ans+=int(x)
print(ans)

Solution (Python):
n = int(input())
ans = 0
for i in range(n):
    x, u  = input().split()
    if u == 'JPY':
        ans += float(x)
    if u == 'BTC':
        ans += float(x) * 380000.0
print(ans)

Solution (Python):
N = int(input())
x = [0 for i in range(N)]
u = [0 for i in range(N)]
sum = 0
for i in range(N):
  x[i], u[i] = map(str, input().split())
for i in range(N):
  if u[i] == "JPY":
    sum += int(x[i])
  elif u[i] == "BTC":
    sum += float(x[i]) * 380000.0
print(sum)

Solution (Python):

N = int(input())

count = 0
for i in range(N):
    x, u = input().split()
    x = float(x)

    if u == 'JPY':
        count += x
    else:
        count += (x * 380000)


print(count)

Solution (Python):
n=int(input())
ans=0
for i in range(n):
  x,u=input().split()
  if u=="JPY":
    ans+=int(x)
  else:
    ans+=380000*float(x)
print(ans)

Solution (Python):
n = int(input())
money = 0
for i in range(n):
    x, u = input().split()
    if u == "JPY":
        money += int(x)
    else:
        money += float(x) * 380000
print(money)

Solution (Python):
N = int(input())

money = 0

for i in range(N):
	x, u= (i for i in input().split())  
	x = float(x)
	if u=="JPY":
		money += x
	else:
		money += 380000*x
print(money)

Solution (Python):
N = int(input())
y = 0
for i in range(N):
    x, u = input().split()
    x = float(x)
    if u=='BTC':
        y = y+380000*x
    else:
        y = y + x
print(y)

Solution (Python):
n = int(input())
ans = 0
for _ in range(n):
    x, u = input().split()
    x = float(x)
    if u == "BTC":
        ans += 380000.0 * x
    else:
        ans += x
print(ans)

Solution (Python):
xrate={"JPY":1, "BTC":380000.0}
S=0
N=int(input())
for i in range(N):
    x,u=input().split()
    S+=float(x)*xrate[u]
print(S)

Solution (Python):
n = int(input())
total = 0
for i in range(n):
    x, u = map(str, input().split())
    if u == "JPY":
        total += float(x)
    else:
        total += float(x) * 380000
print(total)

Solution (Python):
n = int(input())
total = 0
for i in range(n):
  string = input().split()
  if(string[1] == "BTC"):
    total += float(string[0]) * 380000
  else:
    total += float(string[0])

print(total)

Solution (Python):
n  = int(input())
xu = []
s = 0
for i in range(n):
    x, u = map(str, input().split())
    if u == "BTC":
        x = float(x) * 380000
    s += float(x)

print(s)

Solution (Python):
n = int(input())

ans = 0

for i in range(n):
    x,u = input().split()
    if u=='JPY':
        ans += float(x)
    else:
        ans += float(x)*380000

print(ans)

Solution (Python):
N = int(input())
total = 0
for i in range(N):
    x,y = input().split()
    if y == "JPY":
        total += int(x)
    elif y == "BTC":
        total += float(x)*380000
print(total)

Solution (Python):
n =int(input())
x = [0]*n
u = [0]*n
a = 0

for i in range(n):
    x[i], u[i] = map(str,input().split())
    if u[i] == 'JPY':
        a += int(x[i])
    else:
        a += float(x[i]) * 380000 
print(a)

Solution (Python):
n=int(input())
ans = 0
for i in range(n):
    p,t = input().split()
    p = float(p)
    if t=="JPY":
        ans += p
    else:
        ans += 380000*p

print(ans)

Solution (Python):
N = int(input())
a = [input().split() for i in range(N)]
total = 0
for i in range(N):
    if a[i][1] == "JPY":
        total += int(a[i][0])
    else:
        total += float(a[i][0])*380000
print(total)

Solution (Python):
n = int(input())
s = 0
for i in range(n):
    x,u = map(str,input().split())
    if u == "JPY":
        s += float(x)
    else:
        s += float(x)*380000
print(s)

Solution (Python):
N = int(input())
x = [0]*N
u = [0]*N
answer = 0
for i in range(N):
    x[i], u[i] = map(str, input().split())
    if u[i] == "JPY":
        answer += int(x[i])
    else:
        answer += (float(x[i]) * 380000)



print(answer)

Solution (Python):
n=int(input())
an=0

for i in range(n):
    x,u=map(str,input().split())
    if u=="JPY":
        an+=int(x)
    else:
        an+=float(x)*int(380000)

print(an)

Solution (Python):
n=int(input())
ans=0
for i in range(n):
    x,u=input().split()
    if u=='JPY':
        ans+=int(x)
    else:
        ans+=float(x)*380000
print(ans)

Solution (Python):
n = int(input())

x = []
sum = 0

for i in range(n):
    x.append(list(input().split()))

for i in range(n):
    if x[i][1] == 'JPY':
        sum += int(x[i][0])
    else:
        sum += float(x[i][0]) * 380000

print(sum)

Solution (Python):
n = int(input())
ans = 0
for i in range(n):
    money, kind = map(str, input().split())
    if kind == "JPY":
        ans += float(money)
    else:
        ans += float(money)*380000.0
print(ans)

Solution (Python):
N=int(input())
sum=0
for i in range(N):
  x,u=map(str,input().split())
  sum = sum + float(x)*(380000 if u=="BTC" else 1)
print(sum)

Solution (Python):
n = int(input())

otoshi = [list(input().split()) for _ in range(n)]

money = 0
for i in range(n):
    if otoshi[i][1] == "JPY":
        money += float(otoshi[i][0])
    else:
        money += float(otoshi[i][0]) * 380000.0

print(money)

Solution (Python):
"""


 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())


 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  


a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654


char_list = list("abcd") 
"""

import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

if __name__ == "__main__":
    n = int(sys.stdin.readline())
    l = [list(list(sys.stdin.readline().split())) for i in range(n)]

    c = 0
    for i in range(n):
        if l[i][1] == "JPY":
                c += float(l[i][0])
        else:
            c += float(l[i][0]) * 380000
    print(c)

Solution (Python):
n = int(input())
list = [input().split() for i in range(n)]
money = 0
for k in range(n):
  if list[k][1] == "JPY":
    money += int(list[k][0])
  else:
    money += float(list[k][0]) * 380000
print(money)

Solution (Python):
n = int(input())
money = 0
for i in range(n):
    x, u = input().split()
    x = float(x)
    if u == "BTC":
        money += x * 380000.0
    else:
        money += x
print(money)

Solution (Python):
n = int(input())
ans = 0

for i in range(n):
    x, u = input().split()
    x = float(x)
    if u == "JPY":
        ans += int(x)
    else:
        ans += x*380000

print(ans)

Solution (Python):
n = int(input())
ans = 0
for i in range(n):
  x,u = input().split()
  x = float(x)
  if u == "JPY":
    ans += x
  else:
    ans += x*380000
print(ans)

Solution (Python):
n=int(input())
xu=[]
for i in range(n):
    xu.append(list(map(str,input().split())))
yen=0
for i in range(n):
    if xu[i][1]=='JPY':
        yen+=int(xu[i][0])
    else:
        yen+=float(xu[i][0])*380000
print(yen)

Solution (Python):
n=int(input())
c=0
for i in range(n):
  a,b=input().split()
  if b=="JPY":
    c+=float(a)
  else:
    c+=380000*float(a)
print(c)

Solution (Python):


n = int(input())
total = 0
for i in range(n):
    tmp = input().split(' ')
    x = float(tmp[0])
    u = tmp[1]

    if u == "BTC":
        total += x*380000
    if u == "JPY":
        total += x

print(total)

Solution (Python):
N = int(input())
cost = [list(input().split()) for i in range(N)]
count = 0

for i in range(N):
  if cost[i][1] == "JPY":
    count += float(cost[i][0])
  else:
    count += float(cost[i][0]) * 380000.0
    
print(count)

Solution (Python):
N = int(input())

ans = 0

for i in range(N):
    x,u = input().split()
    if u == "JPY":
        c = int(x)
    else:
        c = float(x)*380000
    ans = ans +c
    
print(ans)

Solution (Python):
n = int(input())
m = []
ans = 0
for i in range(n):
    x,u = input().split()
    m.append([float(x),u])
for i in range(n):
    if m[i][1] == 'BTC':
        ans += m[i][0] * 380000.0
    else:
        ans += m[i][0]
print(ans)

Solution (Python):
n = int(input())
total = 0
for i in range(n):
    r = input().split(" ")
    if r[1] == "JPY":
        total += float(r[0])
    else:
        total += float(r[0])*380000
print(total)

Solution (Python):
num = int(input())
str_in = [input() for i in range(num)]

sum = 0.0

for i in range(num):
  tmp   = str_in[i].split()
  value = float(tmp[0])
  unit  = tmp[1]
  
  if(unit == 'BTC'):
    sum += value * 380000.0
  else:
    sum += value
    
print (sum)

Solution (Python):
n=int(input())
lst=[input().split() for _ in range(n)]
lst_j=[]
for i in lst:
    if i[1]=='JPY':
        lst_j.append(int(i[0]))
    elif i[1]=='BTC':
        lst_j.append(float(i[0])*380000)
print(sum(lst_j))

Solution (Python):

n=int(input())
s=[input().split() for _ in range(n)]
res = 0.0
for v, c in s:
    v = float(v)
    v = v if c == 'JPY' else v * 380000.0
    res += v
print(res)

Solution (Python):
N = int(input())
total = 0
for _ in range(N):
    x,u = input().split()
    if u == "JPY":
        total += float(x)
    else:
        total += float(x) * 380000.0
print(total)

Solution (Python):
N = int(input())
ans = 0.0
for _ in range(N):
    xs, u = input().split()
    x = float(xs)
    if u == "JPY":
        ans += x
    else:
        ans += x*380000.0
print(ans)

Solution (Python):
n=int(input())
x=list(list(input().split()) for _ in range(n))

res=0

for i in range(n):
	if x[i][1]=='BTC':
		res+=float(x[i][0])*380000.0
	else:
		res+=int(x[i][0])

print(res)

Solution (Python):
N=int(input())
ans=0
for i in range(N):
  x=list(input().split())
  x[0]=float(x[0])
  if x[1]=='JPY':
    ans+=x[0]
  elif x[1]=='BTC':
    ans+=380000.0*x[0]
    
print(ans)

Solution (Python):
n = int(input())
sum = 0
for i in range(n):
    x, u = input().split()
    if u == "JPY":
        sum += float(x)
    else:
        sum += 380000. * float(x)

print(sum)

Solution (Python):
N = int(input())
ans = 0
for _ in range(N):
    x, u = input().split()
    x = float(x)
    if u == "BTC":
        ans += x * 380000
    else:
        ans += x
print(ans)

Solution (Python):
N = int(input())
ans = 0

for i in range(N):
    x, u = input().split()
    ans += int(x) if u == "JPY" else float(x) * 38e4

print(ans)

Solution (Python):
N = int(input())
res = 0.0
for i in range(N):
  x, u = input().split()
  if u == 'JPY':
    res += float(x)
  else:
    res += float(x) * 380000.0
print(res)

Solution (Python):
N = int(input())

sum = 0.0

for i in range(N):
    S = input()
    S = S.split()

    x = float(S[0])
    u = S[1]

    if u == "JPY":
        sum = sum + x
    else:
        sum = sum + x * 380000

print(sum)

Solution (Python):
n  = int(input())
a = []
total = 0
for _ in range(n):
    a.append(input().strip().split())
for i in range(n):
    b = a[i]
    price = float(b[0])
    name = str(b[1])
    if name == "JPY":
        total += price
    else:
        total += price * 380000
print(total)

Solution (Python):
N = int(input())
money = 0
for i in range(N):
    x, u = input().split()
    if u == "JPY":
    	money += int(x)
    else:
        money += float(x) * 380000.0

print(money)

Solution (Python):
n = int(input())
money = []
for i in range(n):
    x,u = input().split()
    if u == 'JPY':
        money.append(float(x))
    else:
        money.append(float(x) * 380000)
        
print(sum(money))

Solution (Python):
N = int(input())
X = [0] * N
U = [0] * N
for i in range(N):
  X[i], U[i] = input().split()
  X[i] = float(X[i])
  if U[i] == 'BTC':
    X[i] = X[i] * 380000.0
print(sum(X))

Solution (Python):
N = int(input())
ans = 0
for i in range(N):
    x, u = input().split()
    x = float(x)
    if u == "JPY":
        ans += x
    else:
        ans += x * 380000
print(ans)

Solution (Python):
n = int(input())
ans = 0
for _ in range(n):
  x,u = input().split()
  x = float(x)
  if u == 'BTC':
    x *= 380000
  ans += x

print(ans)

Solution (Python):
N = int(input())
p = 0
for i in range(N):
    x, u = input().split()
    p += int(x) if u=='JPY' else float(x)*380000
print(p)

Solution (Python):
n = int(input())
x = []
y = []
sum = 0
for i in range(n):
    a,b = map(str,input().split())
    x.append(float(a))
    y.append(b)
for i in range(n):
    if y[i] == "BTC":
        sum += x[i] * 380000
    else:
        sum += x[i]
print(sum)

Solution (Python):
N=int(input())
sum=0.0
for i in range(N):
    x,u=input().split()
    if u=="BTC": sum+=float(x)*380000.0
    else: sum+=float(x)
print(sum)

Solution (Python):
N = int(input())
sum = 0
for i in range(N):
    x, u = input().split()
    if u == "JPY":
        sum += float(x)
    else:
        sum += float(x) * 380000.0
print(sum)

Solution (Python):
N = int(input())
x = [list(map(str,input().split())) for _ in range(N)]

otoshidama = 0
for i in range(N):
	x[i][0] = float(x[i][0])
	if x[i][1] == "BTC":
		x[i][0] = x[i][0] * 380000.0
	otoshidama += x[i][0]

print(otoshidama)

Solution (Python):


def main():
    N = int(input())
    ans = 0.0
    Rate = 380000.0
    for  i in range(N):
        otosidama, otype = input().split()
        otosidama = float(otosidama)
        if otype == "JPY":
            ans +=otosidama
        else:
            ans += otosidama*Rate
    
    print(ans)










if __name__== "__main__":
    main()

Solution (Python):
N=int(input())
T=0.0
for i in range(N):
  x,u=input().split()
  T += float(x) * (1.0 if u=='JPY' else 380000.0)
print(T)

Solution (Python):
n = int(input())
ans = 0

for _ in range(n):
    x, u = input().split()
    x = float(x)
    if u == 'JPY':
        ans += x
    else:
        ans += x * 380000

print(ans)

Solution (Python):
n = int(input())
yen = 0
for _ in range(n):
  x, u = input().split()
  if u == 'JPY':
    yen += int(x)
  elif u == 'BTC':
    yen += float(x) * 380000
print(yen)

Solution (Python):
N=int(input())
s=0
for i in range(N):
    x=input()
    s+=float(x[:-4])*(1.0+(x[-1]=='C')*380000.0)
print(s)

Solution (Python):


n=int(input())
xlist=[0 for i in range(n)]
ulist=[0 for i in range(n)]
answer=0

for i in range(n):
	xlist[i],ulist[i]=input().split()
	if ulist[i]=="JPY":
		answer+=float(xlist[i])
	else:
		answer+=380000*float(xlist[i])

print(answer)

Solution (Python):
def solve():
    N = int(input())
    result_yen = 0.0
    for _ in range(N):
        x,u = [s for s in input().split() if s]
        coeff = 380000.0 if u == 'BTC' else 1.0
        result_yen += float(x)*coeff
    
    print(result_yen)
    
solve()

Solution (Python):
n = int(input())

ans = 0
for i in range(n):
    x, u = input().split()
    if u == "JPY":
        ans += int(x)
    else:
        ans += (380000 * float(x))

print(ans)

Solution (Python):
N = int(input())
sum = 0

for i in range(N):
        S = input().split()
        x = float(S[0])
        u = S[1]

        if S[1] == 'BTC':
                x *= 380000
        
        sum += x

print(round(sum,5))

Solution (Python):
N = int(input())
ans = 0
for i in range(N):
    x,u = input().split()
    if u == 'BTC':
        ans += float(x) * 380000
    else:
        ans += int(x)

print('{:.8f}'.format(ans))

Solution (Python):
n = int(input())
xu = [input().split() for i in range(n)]
x = [float(xu[i][0]) for i in range(n)]
total=0
for i in range(n):
  if xu[i][1] == 'BTC':
    x[i] = x[i] * 380000.0
  total+=x[i]
print(total)

Solution (Python):
n = int(input())
s = 0
for i in range(n):
    a, b = input().split(" ")
    a = float(a)
    s += a * {"JPY": 1, "BTC": 380000}[b]
print(s)

Solution (Python):
import sys
import math
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    BTC_TO_YEN = 380000.0
    result = 0.0
    otoshidama = [i.split() for i in inputs]
    for o in otoshidama:
        if o[1] == "BTC":
            result += float(o[0]) * BTC_TO_YEN
        else:
            result += float(o[0])
    return result


def string_to_float(string):
    return list(map(lambda x: float(x), string.split()))


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    N = int(input())
    ret = solve(inputs(N))
    print(ret)

Solution (Python):
n = int(input())

ans = 0

for i in range(n):
  x, u = input().split()
  x = float(x)
  u = str(u)
  if u == 'BTC':
    ans += 380000 * x
  else:
    ans += x

print(ans)