#!/usr/bin/env python3
n = int(input())
x_y = [list(input().split()) for _ in range(n)]
ans = 0
for i in range(n):
    if x_y[i][1] == "JPY":
        ans+=float(x_y[i][0])
    else:
        ans+=float(x_y[i][0])*380000
print(ans) n = int(input()) n int(input()) int input() input list(input().split()) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) list(input().split()) list input().split() ().split () input split x_y = [list(input().split()) for _ in range(n)] x_y [list(input().split()) for _ in range(n)] ans = 0 ans 0 for i in range(n):
    if x_y[i][1] == "JPY":
        ans+=float(x_y[i][0])
    else:
        ans+=float(x_y[i][0])*380000 i range(n) range n if x_y[i][1] == "JPY":
        ans+=float(x_y[i][0])
    else:
        ans+=float(x_y[i][0])*380000 x_y[i][1] == "JPY" x_y[i][1] [i] x_y i 1 "JPY" ans+=float(x_y[i][0]) ans float(x_y[i][0]) float x_y[i][0] [i] x_y i 0 ans+=float(x_y[i][0])*380000 ans float(x_y[i][0])*380000 float(x_y[i][0]) float x_y[i][0] [i] x_y i 0 380000 print(ans) print ans ans+=float(x_y[i][0]) float(x_y[i][0]) ans n = int(input()) int(input()) n ans+=float(x_y[i][0])*380000 float(x_y[i][0])*380000 ans ans = 0 0 ans x_y = [list(input().split()) for _ in range(n)] [list(input().split()) for _ in range(n)] x_y
#!/usr/bin/env python3
n = int(input())
x_y = [list(input().split()) for _ in range(n)]
ans = 0
for i in range(n):
    if x_y[i][1] == "JPY":
        ans+=float(x_y[i][0])
    else:
        ans+=float(x_y[i][0])*380000
print(ans)
