N=int(input())
s=0
for i in range(N):
    x,u=map(str,input().split())
    if u=='JPY':
        s+=int(x)
    else:
        s+=380000.0*float(x)
print(s) N=int(input()) N int(input()) int input() input s=0 s 0 for i in range(N):
    x,u=map(str,input().split())
    if u=='JPY':
        s+=int(x)
    else:
        s+=380000.0*float(x) i range(N) range N x,u=map(str,input().split()) x map(str,input().split()) map str input().split() ().split () input split u if u=='JPY':
        s+=int(x)
    else:
        s+=380000.0*float(x) u=='JPY' u 'JPY' s+=int(x) s int(x) int x s+=380000.0*float(x) s 380000.0*float(x) 380000.0 float(x) float x print(s) print s s+=int(x) int(x) s N=int(input()) int(input()) N x,u=map(str,input().split()) map(str,input().split()) x s+=380000.0*float(x) 380000.0*float(x) s u=map(str,input().split()) map(str,input().split()) u s=0 0 s
N=int(input())
s=0
for i in range(N):
    x,u=map(str,input().split())
    if u=='JPY':
        s+=int(x)
    else:
        s+=380000.0*float(x)
print(s)