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())
yen = 0
for i in range(n):
    x,u = input().split()
    if u == "BTC":
        yen += float(x)*380000
    else:
        yen += float(x)
print(yen)

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

print(cnt)

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 += 380000.0 * x
 
print(count)

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

Solution (Python):
n = int(input())
xu = [input().split() for _ 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())
otoshidama = []
for i in range(N):
    x, u = input().split(" ")
    otoshidama.append([float(x),u])

ypb = 380000.0
sum = 0.0

for x,u in otoshidama:
    if u == "JPY":
        sum += x
    else:
        sum += ypb * x

print(sum)

Solution (Python):
def btc2jpy(x):
    return 380000 * x


N = int(input())
jpy = 0
btc = 0
for i in range(N):
    x, u = input().split()
    x = float(x)
    if u == "JPY":
        jpy += x
    else:
        btc += x

result = jpy + btc2jpy(btc)
print(result)

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())
ans=0.0
for i in range(n):
  x,u=input().split()
  if u=="JPY":
    x=int(x)
  else:
    x=float(x)*380000.0
  ans+=x
print(ans)

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

def f(a, b):
  if b == 'JPY':
    return a
  else :
    return 380000.0 * a
s = 0
for i in range(n):
  a,b =  input().split(' ')
  s += f(float(a),b)
print(s)

Solution (Python):
s = 0.0
for i in range(int(input())):
    x, u = [_ for _ in input().split()]
    if u == 'JPY':
        s += int(x)
    else:
        s += float(x) * 380000.0

print(s)

Solution (Python):
def main():
    y = 0
    N = int(input())
    for _ in range(N):
        t = input()
        x = float(t.strip().split(' ')[0])
        u = t.strip().split(' ')[1]
        if u == 'BTC':
            y += 380000.0 * x
        else:
            y += x

    print(y)
    return

if __name__ == '__main__':
    main()

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

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

for _ in range(n):
    
    


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

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

Solution (Python):
n=int(input())
string_list=[input() for i in range(n)]

sum_otoshidama = 0
for i in range(n):
  if string_list[i].split(' ')[1] == 'JPY':
    sum_otoshidama += float(string_list[i].split(' ')[0])
  else:
    sum_otoshidama += float(string_list[i].split(' ')[0]) * 380000

print(sum_otoshidama)

Solution (Python):


import math
import sys
import itertools
import numpy as np


n =int(input())

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

answer =0

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

print(answer)

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

a = []

for i in range(N):
  a.append(input().split(' '))

money = 0
  
for i in range(N):
  if a[i][1] == 'JPY':
    money += float(a[i][0])
  
  else:
    money += float(a[i][0]) * 380000

print(money)

Solution (Python):

N = int(input())

sum=0
for i in range(0,N):
    x,y = input().split(' ')
    if y=='JPY':
        sum += int(x)
    else:
        sum += float(x)*380000.0

print(sum)

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

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

for i in range(N):
    l = input()
    ui = l[-3:]
    xi = float(l[:-3])
    if ui == 'JPY':
        s += xi
    elif ui == 'BTC':
        s += xi*380000.0
    else:
        pass
print(s)

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

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

print(ans)

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

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

Solution (Python):
N =  int(input())
given = [list(input().split()) for i in range(N)]
rate = 380000

def solve():
    given_yen = 0
    given_btc = 0
    for comb in given:
        if comb[1] == 'JPY':
            given_yen += int(comb[0])
        if comb[1] == 'BTC':
            given_btc += float(comb[0])
    return given_yen + given_btc * rate

print(solve())

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

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

Solution (Python):
N = int(input())
x = [0]*N
u = [0]*N
for i in range(0,N):
    x[i], u[i] = input().split()

t = 0

for i in range(0,N):
    if u[i] == 'JPY':
        t = t + int(x[i])
    else:
        t = t + (380000*float(x[i]))

print(t)

Solution (Python):
N = int(input())
x, u = [[], []]
for i in range(N):
    temp = input().split()
    u.append(temp[1])
    if temp[1] == "JPY":
        x.append(int(temp[0]))
    else:
        x.append(float(temp[0]))

btc = 380000.0
jpy = 1.0

result = 0
for i in range(N):
    if u[i] == "JPY":
        result += x[i] * jpy
    else:
        result += x[i] * btc
print(result)

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

a = []
for i in range(N):
    a.append(list(map(str,input().split())))

ans = 0
for i in range(N):
    if a[i][1] == 'JPY':
        ans += int(a[i][0])
    else:
        ans += (float(a[i][0]) * 380000)
        
print(ans)

Solution (Python):




n = int(input())
sum = [0, 0]


for i in range(n):
    x, u = input().split()
    if u == "JPY":
        sum[0] += float(x)
    else:
        sum[1] += float(x)


print(sum[0] + sum[1] * 380000.0)

Solution (Python):
from sys import stdin
N=int(stdin.readline().rstrip())
data=[]
for i in range(N):
    data.append([(x) for x in stdin.readline().rstrip().split()])

ans=0.0
for j in data:
    if j[1] == "BTC":
        ans+=(float(j[0])*380000.0)
    else:
        ans+=float(j[0])
print(ans)

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

for _ in range(N):
    x_str, u = input().split()
    x = float(x_str)
    if u == 'BTC':
        ans += x * BTC
    else:
        ans += x
print(ans)

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

Solution (Python):

sum = 0.0
N = int(input())

for i in range(N):
    num, t = input().split()
    num = float(num)

    if (t == 'BTC'):
        num = num * 380000.0

    sum += num

print('{:.10f}'.format(sum))

Solution (Python):
N = input()
sum = 0
for i in range(int(N)):
    s = input()
    money = float(s.split()[0])
    unit = s.split()[1]
    if unit == "JPY":
        sum += money
    else:
        sum += money * 3.8 * (10**5)

print(sum)

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

print(sum)

Solution (Python):
N = int(input())
tuples = []
for i in range(N):
    x, u = input().split()
    tuples.append((float(x), u))
tot = 0
for tup in tuples:
    if tup[1] == 'JPY':
        tot = tot + tup[0]
    else:
        tot = tot + 380000*tup[0]
print(tot)

Solution (Python):
N = int(input())
list_m = [input().split() for _ in range(N)]

money = 0
for i in range(N):
  if list_m[i][1] == 'JPY':
    money += float(list_m[i][0])
  else:
    money += float(list_m[i][0])*380000.0
print(money)

Solution (Python):
from sys import stdin

def fun():
    n = int(input())
    total = 0

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


if __name__ == '__main__':
    fun()

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

for _ in range(N):
    xu = input().split(" ")
    x = float(xu[0])
    u = xu[1]
    if u == 'JPY':
        Otoshidama += x
    else:
        Otoshidama += x*380000
    
print(Otoshidama)

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

sum = 0

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

    if u == 'JPY':
        sum += int(x)
    else:
        sum += float(x) * 380000.0

print(sum)

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

pair = []
for i in range(n):
	pair.append(list(map(str, input().split())))

sum = 0
for i in range(n):
	if pair[i][1] == 'BTC':
		sum += 380000 * float(pair[i][0])
	else:
		sum += float(pair[i][0])
print(sum)

Solution (Python):
N = int(raw_input())
x = list()
u = list()
count = 0
for i in xrange(N):
    array = list(raw_input().split())
    if array[1] == 'JPY': unit = 1.0
    else: unit = 380000.0
    count += unit * float(array[0])

print count

Solution (Python):
SCALE = 380000

N = int(input())
ans = 0
for i in range(N):
    s = input().split()
    if s[1] == "JPY":
        ans += float(s[0])
    elif s[1] == "BTC":
        ans += float(s[0]) * SCALE

print(ans)

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

ans = 0
for _ in range(n):
    x_i, u_i = list(input().split())
    if u_i == "JPY":
        ans += int(x_i)
    else:
        ans += float(x_i) * 380000

print(ans)

Solution (Python):
import sys

oto = []

N = int(sys.stdin.readline())
for i in range(N):
    input_lines = sys.stdin.readline()
    oto.append(input_lines.split())


mny = 0

for i in range(N):
    if(oto[i][1] == "BTC"):
        mny += float(oto[i][0]) * 380000
    else:
        mny += float(oto[i][0])
        
print(mny)

Solution (Python):
N = int(input())
Y = 0.0
for i in range(N):
    x, u = input().split()

    if u=='BTC':
        Y += float(x)*380000
    else:
        Y += float(x)

print(Y)

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

Solution (Python):
N = int(input())
X = []
for i in range(N):
  x = input().split(" ")
  X.append([float(x[0]), x[1]])

total = 0  
for x in X:
  if x[1] == "JPY":
    total += x[0]
  else:
    total += x[0] * 380000.0
print(total)

Solution (Python):
import sys

def parse(inp):
    N=int(next(inp).split()[0])
    
    gifts=[[] for _ in range(N)]
    
    for i in range(N):
        gifts[i]=list(next(inp).split())
    return N,gifts
  
def main(inp):
    N=inp[0]
    gifts=inp[1]
    
    total = 0
    
    for i in range(N):
        if(gifts[i][1]=="JPY"):
            total += int(gifts[i][0])
        elif(gifts[i][1]=="BTC"):
            total += float(gifts[i][0])*380000.0
            
    return total
  
print(main(parse(sys.stdin)))

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

x = [0 for p in range(N)]
for i in range(N):
    x[i] = input().split()

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

print(sum)

Solution (Python):
n=int(input())
s=[input().split() for i in range(n)]
s=[[float(l[0]), l[1]] for l in s]
s=sum([l[0]*380000.0 if l[1] == 'BTC' else l[0] for l in s])
print(s)

Solution (Python):

result = 0
n = int(input())
for i in range(n):
    x, u = input().split(" ")
    if u == 'JPY':
        result += int(x)
    else :
        result += float(x)*380000
print("{}".format(result))

Solution (Python):
import sys
input = sys.stdin.readline

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

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

total = 0
for i in range(n):
    [m, type] = input().split(" ")
    if type == "JPY":
        total += float(m)
    else:
        total += 380000.0 * float(m)

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.0
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.0
print(ans)

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

Solution (Python):
line_num = int(input())
otoshidama_list = []
bitcoin_rate = 380000.0

for _ in range(line_num):
    line = input().split(' ')
    otoshidama = (float(line[0]), line[1])
    otoshidama_list.append(otoshidama)


def trans_otoshidama(otoshidama):
    if otoshidama[1] == "JPY":
        return otoshidama[0]
    else:
        return otoshidama[0] * bitcoin_rate


trans_list = list(map(trans_otoshidama, otoshidama_list))
print(sum(trans_list))

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

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

total=0
for i in range(n):
    if a[i][1]=="JPY":
        total+=int(a[i][0])
    elif a[i][1]=="BTC":
        total+=float(a[i][0])*380000
print(total)

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

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(ans)

Solution (Python):
"""
B - Digital Gifts
"""


def solve():
    N = int(input())
    sum_ochotama = 0
    for n in range(N):
        x, u = input().split()
        x = float(x)
        sum_ochotama += x if u == 'JPY' else x * 380000
    print(sum_ochotama)


if __name__ == '__main__':
    solve()

Solution (Python):
jpy = []
btc = []
for _ in range(int(input())):
    s = [x for x in input().split()]
    if s[1] == "JPY":
        jpy.append(float(s[0]))
    else:
        btc.append(float(s[0]))
print(sum(jpy) + sum(btc)*380000)

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

sum=0.0
for i in range(N):
    data=input().split()
    if data[1] == 'JPY':
        alpha=1.0
    else:
        alpha=380000.0
    sum = sum + alpha*float(data[0])
print(sum)

Solution (Python):
n = int(input())
x = [[i for i in input().split()] for j in range(n)]
sum = 0
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())
total = 0.0

for i in range(n):
  num, param = input().split(' ')
  if param == "JPY":
    total += float(num)
  else:
    total += float(num) * 380000.0

print(total)

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



sum=0

for i in range(N):
    X,U = raw_input().split()
    if U == 'JPY':
        sum = sum + int(X)
    else:

        sum = sum + (float(X) * 380000)

print sum

Solution (Python):

import sys

JPY = 'JPY'
BTC = 'BTC'
RAITO_BTC_TO_JPY = 380000


def solve(N: int, x: "List[float]", u: "List[str]"):
    
    x_ = []
    for i in range(N):
        x_.append(standardize_to_JPY(x[i], u[i]))
    print(sum(x_))
    return

def standardize_to_JPY(xi, ui):
    if ui == BTC:
        return xi * RAITO_BTC_TO_JPY
    else:
        return xi

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    x = [float()] * (N)  
    u = [str()] * (N)  
    for i in range(N):
        x[i] = float(next(tokens))
        u[i] = next(tokens)
    solve(N, x, u)

if __name__ == '__main__':
    main()

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 += (x*380000)
    else:
        ans += x
print(ans)

Solution (Python):
a = []
n = int(input())
for i in range(n):
    a.append(input().split())
s = 0.0
for i in range(n):
    if (a[i][1])=="BTC":
        s += float(a[i][0]) * 380000.0
    else:
        s += float(a[i][0])
print(s)

Solution (Python):

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

n = int(input())
en = 0
c = float(0.0)
for i in range(n):
    a, b= map(str, input().split())
    if b == "JPY":
        en += int(a)
    else:
        c += float(a)
ans = en
ans += c * 380000.0
print(ans)

Solution (Python):

"""
Created on Sun Feb 24 21:07:24 2019

@author: Yamazaki Kenichi
"""

N = int(input())
A = [list(map(str,input().split())) for i in range(N)]

ans = 0
for i in range(N):
    if A[i][1] == 'BTC':
        ans += float(A[i][0])*380000
    else:
        ans += int(A[i][0])
print(ans)

Solution (Python):
n = int(input())
x,u = [],[]
for i in range(n):
  X,U = map(str, input().split())
  x.append(float(X))
  u.append(U)
y = 0
b = 0
for i in range(n):
  if u[i] == 'JPY':
    y += x[i]
  else:
    b += x[i]
print(y + b*380000.0)

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

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

for i in range(N):
	L[i][0] = float(L[i][0])
total = 0
for i in range(N):
	if L[i][1] == 'JPY':
		total = total +  L[i][0]
	elif L[i][1] == 'BTC':
		total = total +  L[i][0]*380000
print(total)

Solution (Python):
N = int(input())
otoshidama = [input().split() for i in range(N)]

result = 0

for val, tsuka in otoshidama:
    if tsuka == 'BTC':
        result += 380000 * float(val)
    else:
        result += float(val)

print(result)

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

x= [0,0,0,0,0,0,0,0,0,0]
v= [0,0,0,0,0,0,0,0,0,0]
ans = 0
for i in range(n):
    x[i], v[i] = input().split()

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

print(ans)

Solution (Python):
N = int(input())
J = 0.0
B = 0.0

for n in range(N):
    v, s = input().split()
    if s == "JPY":
        J += float(v)
    else:
        B += float(v)

print(J + B * 380000.0)

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

sum=0

for i in range(n):
    m,k = input().split(' ')
    m = float(m)
    if k=='BTC':
        m*=380000.0
    sum+=m

print(sum)

Solution (Python):
N = int(input())
li = []
A =[]
B=[]
for i in range(N):
    li = list(input().split())
    A.append(float(li[0]))
    B.append(li[1])



i = 0
res=0
for i in range(N):
    if(B[i]=="JPY"):
        res+=A[i]
    else:
        res+=380000*A[i]

print(res)

Solution (Python):
n = int(input())
listA = []
for i in range(n):
    listA.append(input().split())

sum = 0
for l in listA:
    if l[1] == "JPY":
        sum += float(l[0])
    else:
        sum += float(l[0]) * 380000.0

print(sum)

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

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

for i in range(n):
	kingaku, syurui = input().split()
	if syurui == 'BTC':
		total += float(kingaku) * 380000
	else:
		total += float(kingaku)

print(total)

Solution (Python):
import math
import numpy as np
import sys
def IL(): return list(map(int,sys.stdin.readline().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
xu = [SL() for i in range(N)]
j = 0
b = 0

for i in xu:
    x,u = i
    if u == "JPY":
        j += float(x)
    else:
        b += float(x)*380000

print(j+b)

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

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

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

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

su = 0

for i in range(a):
	n,m = input().split()
	if m == "JPY":
		su += int(n)
	else:
		su += float(n)*380000

print(su)

Solution (Python):
num = input()
en = 0.0
for x in range(int(num)):
    num1 = input().split()
    if(num1[1] == "JPY"):
        en += float(num1[0])
    else:
        en += float(num1[0])*380000.0
print(en)

Solution (Python):
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque, OrderedDict
from copy import deepcopy
from functools import lru_cache, reduce
from math import ceil, floor

import heapq
import itertools
import operator


inf = float('inf')


def get_int():
    return int(input())


def get_str():
    return input().strip()


def get_list_of_float():
    return [float(i) for i in input().split()]


def get_char_list():
    return list(input().strip())


YPB = 380000.0



N = 0
X = [0.0]
U = [""]


def set_inputs():
    global N, X, U
    N = get_int()
    X = []
    U = []
    for _ in range(N):
        x, u = get_str().split()
        X.append(float(x))
        U.append(u)


def main():
    set_inputs()
    sum = 0.0
    for i in range(N):
        u = 1
        if U[i] == 'BTC':
            u = YPB
        sum += X[i] * u
    print(sum)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
list = [list(map(str,input().split())) for i in range(N)]
sum = 0
for ele in list:
    if ele[1]=="JPY":
        sum += int(ele[0])
    else:
        sum += (float(ele[0])*380000.0)

print(sum)

Solution (Python):
N = int(input())
x = [0]*N
u = [0]*N
for i in range(N):
    x[i], u[i] = input().split()
y = list(map(float, x))

ans = 0
for i in range(N):
    if u[i] == 'JPY':
        ans += y[i]
    else:
        ans += y[i]*380000
print(ans)

Solution (Python):
N = int(input())
btc = 380000.0
ans = 0
for i in range(N):
    x, y = input().split()

    if y == "BTC":
        work = btc * float(x)
    else:
        work = float(x)

    ans += work

print(ans)

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

Solution (Python):
n = int(input())
x = []
u = []
for _ in range(n):
    xi, ui = list(input().split())
    x.append(float(xi))
    u.append(ui)
    
yen = 0
for i in range(n):
    if u[i] == 'JPY':
        yen += x[i]
    else:
        yen += x[i] * 380000.0

print(yen)

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

Solution (Python):
n = int(input())
ot = [input().split() for _ in range(n)]
s = 0
for y, b in ot:
  if b == 'JPY':
    s += float(y)
  else:
    s += float(y) * 380000.0
print(s)

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

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

print(sum)

Solution (Python):
N = int(input())
x_u = [list(map(str, input().split())) for i in range(N)]
ans = 0
for i in range(N):
	if x_u[i][1] == 'BTC':
		ans += float(x_u[i][0]) * 380000
	else:
		ans += float(x_u[i][0])
print(ans)

Solution (Python):


import random
import bisect




def IT(): 
    return int(input())
def IL(): 
    return [int(_) for _ in input().split()]
def IS(): 
    return [_ for _ in input().split()]
def ILS(n): 
    return [int(input()) for _ in range(n)]
def SLS(n): 
    return [input() for _ in range(n)]
def ILSS(n): 
    return [[int(_) for _ in input().split()] for j in range(n)]


def bit_full_search(ss):
    n = len(ss)
    for i in range(1 << n):
        s = ""
        for j in range(n + 1):
            if ((1 & i >> j) == 1):
                s += ss[j]
        print(s)
def bit_full_search2(A):
    
    value = []
    for i in range(1 << len(A)):
        output = []

        for j in range(len(A)):
            if ((i >> j) & 1) == 1:
                
                output.append(A[j])
        value.append([format(i, 'b').zfill(16), sum(output)])

    value.sort(key=lambda x:x[1])
    bin = [value[k][0] for k in range(len(value))]
    val = [value[k][1] for k in range(len(value))]
    return bin, val
def matching_bisect(list1_val, list2_val, n):
    
    j = 0
    for i in range(len(list1_val)):
        j = bisect.bisect_left(list2_val, n - list1_val[i])
        if j < len(list2_val):
            if list1_val[i] + list2_val[j] == n:
                
                break
    return j

"""ここからメインコード"""


def main():
    n = IT()
    xu = []
    for i in range(n):
        xu.append(input().split())

    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)
    
    
    

main()

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

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

print(ans)

Solution (Python):
n = int(input())
xs, us = [], []
for _ in range(n):
  x, u = input().split(' ')
  xs.append(float(x))
  us.append(u)
total_yen = 0
for x, u in zip(xs, us):
  if u == 'BTC':
    total_yen += (x*380000.0)
  else:
    total_yen += x
print(total_yen)

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

print(output)

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

s = 0
for i in range(t):
    x,y = input().split()
    if(y == "JPY"):
        s += float(x)
    else:
        s += float(x) * 380000

print(s)

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

Solution (Python):
n=int(input())
count=0
for i in range(n):
    x,y=input().split(' ')
    x=float(x)
    if y=="JPY":
        count+=x
    else:
        count+=(x*380000.00)
print(count)

Solution (Python):


"""
s = input().split("/")
if int(s[1]) <= 4:
    print("Heisei")
else:
    print("TBD")


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

Solution (Python):
def y():
  for _ in range(int(input())):
    x, u = input().split()
    x = float(x)
    yield x if u=='JPY' else x*380000
print(sum(y()))

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

Solution (Python):

import re
from datetime import datetime as dt
if __name__ == '__main__':
    n = input()
    sum = 0.0
    for i in range(n):
        x, u = raw_input().split()
        if u == 'JPY':
            sum += int(x)
        else:
            sum += float(x) * 380000
    print sum

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

Solution (Python):
N=int(input())
X=list()
U=list()
for i in range(N):
    a,b = [i for i in input().split()]
    X.append(float(a))
    U.append(b)
sum=0.0
for price,kind in zip(X,U):
    if kind == 'JPY':
        sum += price
    else:
        sum+= 380000 * price
print (sum)

Solution (Python):
jpy_per_btc = 380000.0

n = int(input())
money = []
for _ in range(n):
    (x, u) = input().split()
    is_jpy = ("JPY" == u)
    money.append([int(x) if is_jpy else float(x), is_jpy])

sum = 0
for i in money:
    sum += i[0] if i[1] else (i[0] * jpy_per_btc)
print(sum)

Solution (Python):

n = int(input())


ans = 0.0
for _ in range(n):
    
    n,u = input().split()
    money = float(n)
    is_jpy = u == 'JPY'

    ans += money if is_jpy else money * 380000.0
    

print(ans)