n = int(input())

otosidama = 0.0
bit = 380000
for i in range(n):
    x, v = input().split()

    if v == 'JPY':
        otosidama += float(x)
    else:
        otosidama += float(x) * bit
print(otosidama) n = int(input()) n int(input()) int input() input otosidama = 0.0 otosidama 0.0 bit = 380000 bit 380000 for i in range(n):
    x, v = input().split()

    if v == 'JPY':
        otosidama += float(x)
    else:
        otosidama += float(x) * bit i range(n) range n x, v = input().split() x input().split() ().split () input split v if v == 'JPY':
        otosidama += float(x)
    else:
        otosidama += float(x) * bit v == 'JPY' v 'JPY' otosidama += float(x) otosidama float(x) float x otosidama += float(x) * bit otosidama float(x) * bit float(x) float x bit print(otosidama) print otosidama x, v = input().split() input().split() x otosidama += float(x) * bit float(x) * bit otosidama bit = 380000 380000 bit n = int(input()) int(input()) n otosidama = 0.0 0.0 otosidama v = input().split() input().split() v otosidama += float(x) float(x) otosidama
n = int(input())

otosidama = 0.0
bit = 380000
for i in range(n):
    x, v = input().split()

    if v == 'JPY':
        otosidama += float(x)
    else:
        otosidama += float(x) * bit
print(otosidama)
