n = int(input())
total = 0
for i in range(n):
    value, currency = input().split()
    if currency == 'JPY':
        total += float(value)
    else:
        total += float(value) * 380000
print(total) n = int(input()) n int(input()) int input() input total = 0 total 0 for i in range(n):
    value, currency = input().split()
    if currency == 'JPY':
        total += float(value)
    else:
        total += float(value) * 380000 i range(n) range n value, currency = input().split() value input().split() ().split () input split currency if currency == 'JPY':
        total += float(value)
    else:
        total += float(value) * 380000 currency == 'JPY' currency 'JPY' total += float(value) total float(value) float value total += float(value) * 380000 total float(value) * 380000 float(value) float value 380000 print(total) print total currency = input().split() input().split() currency n = int(input()) int(input()) n value, currency = input().split() input().split() value total += float(value) float(value) total total = 0 0 total total += float(value) * 380000 float(value) * 380000 total
n = int(input())
total = 0
for i in range(n):
    value, currency = input().split()
    if currency == 'JPY':
        total += float(value)
    else:
        total += float(value) * 380000
print(total)