N = int(input())
X, U = [], []
T = 0
for _ in range(N):
  x, u = input().split()
  X.append(x)
  U.append(u)
for x, u in zip(X, U):
  if u == "JPY":
    T += int(x)
  else:
    T += float(x)*380000.0
print(T) N = int(input()) N int(input()) int input() input X, U = [], [] X [] U [] T = 0 T 0 for _ in range(N):
  x, u = input().split()
  X.append(x)
  U.append(u) _ range(N) range N x, u = input().split() x input().split() ().split () input split u X.append(x) X.append X append x U.append(u) U.append U append u for x, u in zip(X, U):
  if u == "JPY":
    T += int(x)
  else:
    T += float(x)*380000.0 x u zip(X, U) zip X U if u == "JPY":
    T += int(x)
  else:
    T += float(x)*380000.0 u == "JPY" u "JPY" T += int(x) T int(x) int x T += float(x)*380000.0 T float(x)*380000.0 float(x) float x 380000.0 print(T) print T T += int(x) int(x) T N = int(input()) int(input()) N T = 0 0 T U = [], [] [] U X, U = [], [] [] X x, u = input().split() input().split() x u = input().split() input().split() u T += float(x)*380000.0 float(x)*380000.0 T
N = int(input())
X, U = [], []
T = 0
for _ in range(N):
  x, u = input().split()
  X.append(x)
  U.append(u)
for x, u in zip(X, U):
  if u == "JPY":
    T += int(x)
  else:
    T += float(x)*380000.0
print(T)