Row = int(input())
List = []
for i in range (Row):
  List.append(list(map(str, input().split())))
res = 0
for i in range(Row):
  if List[i][1] == "JPY":
    res += float(List[i][0])
  else:
    res += float(List[i][0])*380000
print(res) Row = int(input()) Row int(input()) int input() input List = [] List [] for i in range (Row):
  List.append(list(map(str, input().split()))) i range (Row) range Row List.append(list(map(str, input().split()))) List.append List append list(map(str, input().split())) list map(str, input().split()) map str input().split() ().split () input split res = 0 res 0 for i in range(Row):
  if List[i][1] == "JPY":
    res += float(List[i][0])
  else:
    res += float(List[i][0])*380000 i range(Row) range Row if List[i][1] == "JPY":
    res += float(List[i][0])
  else:
    res += float(List[i][0])*380000 List[i][1] == "JPY" List[i][1] [i] List i 1 "JPY" res += float(List[i][0]) res float(List[i][0]) float List[i][0] [i] List i 0 res += float(List[i][0])*380000 res float(List[i][0])*380000 float(List[i][0]) float List[i][0] [i] List i 0 380000 print(res) print res List = [] [] List res = 0 0 res Row = int(input()) int(input()) Row res += float(List[i][0]) float(List[i][0]) res res += float(List[i][0])*380000 float(List[i][0])*380000 res
Row = int(input())
List = []
for i in range (Row):
  List.append(list(map(str, input().split())))
res = 0
for i in range(Row):
  if List[i][1] == "JPY":
    res += float(List[i][0])
  else:
    res += float(List[i][0])*380000
print(res)