# input
N = int(input())

otoshidama = 0
BTC_rate = 380000.0
for i in range(1, N + 1):
    x, u = map(str, input().split())
    
    # check
    if u == "BTC":
        otoshidama += float(x) * BTC_rate
    else:
        otoshidama += float(x)

print(otoshidama) N = int(input()) N int(input()) int input() input otoshidama = 0 otoshidama 0 BTC_rate = 380000.0 BTC_rate 380000.0 for i in range(1, N + 1):
    x, u = map(str, input().split())
    
    # check
    if u == "BTC":
        otoshidama += float(x) * BTC_rate
    else:
        otoshidama += float(x) i range(1, N + 1) range 1 N + 1 N 1 x, u = map(str, input().split()) x map(str, input().split()) map str input().split() ().split () input split u if u == "BTC":
        otoshidama += float(x) * BTC_rate
    else:
        otoshidama += float(x) u == "BTC" u "BTC" otoshidama += float(x) * BTC_rate otoshidama float(x) * BTC_rate float(x) float x BTC_rate otoshidama += float(x) otoshidama float(x) float x print(otoshidama) print otoshidama otoshidama += float(x) float(x) otoshidama x, u = map(str, input().split()) map(str, input().split()) x N = int(input()) int(input()) N u = map(str, input().split()) map(str, input().split()) u otoshidama += float(x) * BTC_rate float(x) * BTC_rate otoshidama BTC_rate = 380000.0 380000.0 BTC_rate otoshidama = 0 0 otoshidama
# input
N = int(input())

otoshidama = 0
BTC_rate = 380000.0
for i in range(1, N + 1):
    x, u = map(str, input().split())
    
    # check
    if u == "BTC":
        otoshidama += float(x) * BTC_rate
    else:
        otoshidama += float(x)

print(otoshidama)