#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [input() for _ in range(n)]

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

ans = 0

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


 n = int(input()) n int(input()) int input() input list(map(str,input().split())) for i in range(n) for i in range(n) i range(n) range n for i in range(n) list(map(str,input().split())) list map(str,input().split()) map str input().split() ().split () input split l = [list(map(str,input().split())) for i in range(n)] l [list(map(str,input().split())) for i in range(n)] ans = 0 ans 0 for i in range(n):
    if l[i][1] == "JPY":
        ans += int(l[i][0])
    else:
        ans += float(l[i][0])*380000.0 i range(n) range n if l[i][1] == "JPY":
        ans += int(l[i][0])
    else:
        ans += float(l[i][0])*380000.0 l[i][1] == "JPY" l[i][1] [i] l i 1 "JPY" ans += int(l[i][0]) ans int(l[i][0]) int l[i][0] [i] l i 0 ans += float(l[i][0])*380000.0 ans float(l[i][0])*380000.0 float(l[i][0]) float l[i][0] [i] l i 0 380000.0 print(ans) print ans l = [list(map(str,input().split())) for i in range(n)] [list(map(str,input().split())) for i in range(n)] l ans += float(l[i][0])*380000.0 float(l[i][0])*380000.0 ans n = int(input()) int(input()) n ans = 0 0 ans ans += int(l[i][0]) int(l[i][0]) ans
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [input() for _ in range(n)]

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

ans = 0

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



