n = int(input())
x = list(input().split() for i in range(n))
c = 0

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

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

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

print(c)