# B - Digital Gifts

N = int(input())
ans = 0
xrate = 380000

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

print(ans) N = int(input()) N int(input()) int input() input ans = 0 ans 0 xrate = 380000 xrate 380000 for i in range(N):
    x, u = map(str, input().split())
    if u == 'BTC':
        ans += float(x) * xrate
    else:
        ans += float(x) i range(N) range N x, u = map(str, input().split()) x map(str, input().split()) map str input().split() ().split () input split u if u == 'BTC':
        ans += float(x) * xrate
    else:
        ans += float(x) u == 'BTC' u 'BTC' ans += float(x) * xrate ans float(x) * xrate float(x) float x xrate ans += float(x) ans float(x) float x print(ans) print ans N = int(input()) int(input()) N xrate = 380000 380000 xrate x, u = map(str, input().split()) map(str, input().split()) x ans += float(x) * xrate float(x) * xrate ans ans = 0 0 ans ans += float(x) float(x) ans u = map(str, input().split()) map(str, input().split()) u
# B - Digital Gifts

N = int(input())
ans = 0
xrate = 380000

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

print(ans)
