N = int(input())
sm = 0
for i in range(N):
    m,c = input().split()
    m = float(m)
    if c == 'JPY':
        sm += m
    else:
        sm += m*380000.0
print(sm)



 N = int(input()) N int(input()) int input() input sm = 0 sm 0 for i in range(N):
    m,c = input().split()
    m = float(m)
    if c == 'JPY':
        sm += m
    else:
        sm += m*380000.0 i range(N) range N m,c = input().split() m input().split() ().split () input split c m = float(m) m float(m) float m if c == 'JPY':
        sm += m
    else:
        sm += m*380000.0 c == 'JPY' c 'JPY' sm += m sm m sm += m*380000.0 sm m*380000.0 m 380000.0 print(sm) print sm N = int(input()) int(input()) N sm += m*380000.0 m*380000.0 sm m = float(m) float(m) m sm = 0 0 sm c = input().split() input().split() c sm += m m sm m,c = input().split() input().split() m
N = int(input())
sm = 0
for i in range(N):
    m,c = input().split()
    m = float(m)
    if c == 'JPY':
        sm += m
    else:
        sm += m*380000.0
print(sm)




