JPY = 1
BTC = 380000
n = int(input())
ans = 0
for i in range(n):
    x,u = map(str,input().split())
    if u == 'BTC':
        tmp = float(x) * BTC
    else:
        tmp = int(x) * JPY
    ans += tmp
print(ans) JPY = 1 JPY 1 BTC = 380000 BTC 380000 n = int(input()) n int(input()) int input() input ans = 0 ans 0 for i in range(n):
    x,u = map(str,input().split())
    if u == 'BTC':
        tmp = float(x) * BTC
    else:
        tmp = int(x) * JPY
    ans += tmp 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':
        tmp = float(x) * BTC
    else:
        tmp = int(x) * JPY
     u == 'BTC' u 'BTC' tmp = float(x) * BTC tmp float(x) * BTC float(x) float x BTC tmp = int(x) * JPY tmp int(x) * JPY int(x) int x JPY ans += tmp ans tmp print(ans) print ans u = map(str,input().split()) map(str,input().split()) u ans += tmp tmp ans JPY = 1 1 JPY BTC = 380000 380000 BTC n = int(input()) int(input()) n x,u = map(str,input().split()) map(str,input().split()) x ans = 0 0 ans tmp = int(x) * JPY int(x) * JPY tmp tmp = float(x) * BTC float(x) * BTC tmp
JPY = 1
BTC = 380000
n = int(input())
ans = 0
for i in range(n):
    x,u = map(str,input().split())
    if u == 'BTC':
        tmp = float(x) * BTC
    else:
        tmp = int(x) * JPY
    ans += tmp
print(ans)