n = int(input())

xu = [0]*n

for i in range(n):
  xu[i] = input().split()
  
ans = []
#print(xu)
for i in range(n):
  if(xu[i][1] == "BTC"):
    ans.append(float(xu[i][0])*380000.0)
  else:
    ans.append(int(xu[i][0]))
print(sum(ans)) n = int(input()) n int(input()) int input() input xu = [0]*n xu [0]*n [0] 0 n for i in range(n):
  xu[i] = input().split()
   i range(n) range n xu[i] = input().split() xu[i] xu i input().split() ().split () input split ans = [] ans [] for i in range(n):
  if(xu[i][1] == "BTC"):
    ans.append(float(xu[i][0])*380000.0)
  else:
    ans.append(int(xu[i][0])) i range(n) range n if(xu[i][1] == "BTC"):
    ans.append(float(xu[i][0])*380000.0)
  else:
    ans.append(int(xu[i][0])) xu[i][1] == "BTC" xu[i][1] [i] xu i 1 "BTC" ans.append(float(xu[i][0])*380000.0) ans.append ans append float(xu[i][0])*380000.0 float(xu[i][0]) float xu[i][0] [i] xu i 0 380000.0 ans.append(int(xu[i][0])) ans.append ans append int(xu[i][0]) int xu[i][0] [i] xu i 0 print(sum(ans)) print sum(ans) sum ans n = int(input()) int(input()) n ans = [] [] ans xu = [0]*n [0]*n xu
n = int(input())

xu = [0]*n

for i in range(n):
  xu[i] = input().split()
  
ans = []
#print(xu)
for i in range(n):
  if(xu[i][1] == "BTC"):
    ans.append(float(xu[i][0])*380000.0)
  else:
    ans.append(int(xu[i][0]))
print(sum(ans))