n = int(input())
a = [list(input().split()) for nesya in range(n)]
c = 0
for hoge in a:
  if hoge[1] == 'JPY':
    c += int(hoge[0])
  else:
    c += float(hoge[0])*380000
print(c) n = int(input()) n int(input()) int input() input list(input().split()) for nesya in range(n) for nesya in range(n) nesya range(n) range n for nesya in range(n) list(input().split()) list input().split() ().split () input split a = [list(input().split()) for nesya in range(n)] a [list(input().split()) for nesya in range(n)] c = 0 c 0 for hoge in a:
  if hoge[1] == 'JPY':
    c += int(hoge[0])
  else:
    c += float(hoge[0])*380000 hoge a if hoge[1] == 'JPY':
    c += int(hoge[0])
  else:
    c += float(hoge[0])*380000 hoge[1] == 'JPY' hoge[1] hoge 1 'JPY' c += int(hoge[0]) c int(hoge[0]) int hoge[0] hoge 0 c += float(hoge[0])*380000 c float(hoge[0])*380000 float(hoge[0]) float hoge[0] hoge 0 380000 print(c) print c a = [list(input().split()) for nesya in range(n)] [list(input().split()) for nesya in range(n)] a n = int(input()) int(input()) n c += float(hoge[0])*380000 float(hoge[0])*380000 c c = 0 0 c c += int(hoge[0]) int(hoge[0]) c
n = int(input())
a = [list(input().split()) for nesya in range(n)]
c = 0
for hoge in a:
  if hoge[1] == 'JPY':
    c += int(hoge[0])
  else:
    c += float(hoge[0])*380000
print(c)