N = int(input())
total =0
for i in range(N):
  MM = input().split()
  if MM[-1] == 'JPY':
    total += float(MM[0])
  else:
    total += float(MM[0]) *380000
print(total) N = int(input()) N int(input()) int input() input total =0 total 0 for i in range(N):
  MM = input().split()
  if MM[-1] == 'JPY':
    total += float(MM[0])
  else:
    total += float(MM[0]) *380000 i range(N) range N MM = input().split() MM input().split() ().split () input split if MM[-1] == 'JPY':
    total += float(MM[0])
  else:
    total += float(MM[0]) *380000 MM[-1] == 'JPY' MM[-1] MM -1 'JPY' total += float(MM[0]) total float(MM[0]) float MM[0] MM 0 total += float(MM[0]) *380000 total float(MM[0]) *380000 float(MM[0]) float MM[0] MM 0 380000 print(total) print total total =0 0 total N = int(input()) int(input()) N MM = input().split() input().split() MM total += float(MM[0]) *380000 float(MM[0]) *380000 total total += float(MM[0]) float(MM[0]) total
N = int(input())
total =0
for i in range(N):
  MM = input().split()
  if MM[-1] == 'JPY':
    total += float(MM[0])
  else:
    total += float(MM[0]) *380000
print(total)