# B Digital Gifts
N = int(input())
X = [list(map(str, input().split())) for _ in range(N)]
gifts = 0
for i in range(N):
    if X[i][1] == 'JPY':
        gifts += int(X[i][0])
    else:
        gifts += float(X[i][0]) * 380000
print(gifts) N = int(input()) N int(input()) int input() input list(map(str, input().split())) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) list(map(str, input().split())) list map(str, input().split()) map str input().split() ().split () input split X = [list(map(str, input().split())) for _ in range(N)] X [list(map(str, input().split())) for _ in range(N)] gifts = 0 gifts 0 for i in range(N):
    if X[i][1] == 'JPY':
        gifts += int(X[i][0])
    else:
        gifts += float(X[i][0]) * 380000 i range(N) range N if X[i][1] == 'JPY':
        gifts += int(X[i][0])
    else:
        gifts += float(X[i][0]) * 380000 X[i][1] == 'JPY' X[i][1] [i] X i 1 'JPY' gifts += int(X[i][0]) gifts int(X[i][0]) int X[i][0] [i] X i 0 gifts += float(X[i][0]) * 380000 gifts float(X[i][0]) * 380000 float(X[i][0]) float X[i][0] [i] X i 0 380000 print(gifts) print gifts gifts += int(X[i][0]) int(X[i][0]) gifts gifts += float(X[i][0]) * 380000 float(X[i][0]) * 380000 gifts gifts = 0 0 gifts N = int(input()) int(input()) N X = [list(map(str, input().split())) for _ in range(N)] [list(map(str, input().split())) for _ in range(N)] X
# B Digital Gifts
N = int(input())
X = [list(map(str, input().split())) for _ in range(N)]
gifts = 0
for i in range(N):
    if X[i][1] == 'JPY':
        gifts += int(X[i][0])
    else:
        gifts += float(X[i][0]) * 380000
print(gifts)
