import sys
def I(): return int(sys.stdin.readline().rstrip())
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり

N = I()
xy = [LS() for _ in range(N)]

ans = 0
for i in range(N):
    x,y = xy[i]
    x = float(x)
    if y == 'JPY':
        ans += x
    else:
        ans += 380000*x

print(ans) import sys sys def I(): return int(sys.stdin.readline().rstrip()) I def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり LS N = I() N I() I LS() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) LS() LS xy = [LS() for _ in range(N)] xy [LS() for _ in range(N)] ans = 0 ans 0 for i in range(N):
    x,y = xy[i]
    x = float(x)
    if y == 'JPY':
        ans += x
    else:
        ans += 380000*x i range(N) range N x,y = xy[i] x xy[i] xy i y x = float(x) x float(x) float x if y == 'JPY':
        ans += x
    else:
        ans += 380000*x y == 'JPY' y 'JPY' ans += x ans x ans += 380000*x ans 380000*x 380000 x print(ans) print ans def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり LS ans += 380000*x 380000*x ans xy = [LS() for _ in range(N)] [LS() for _ in range(N)] xy x,y = xy[i] xy[i] x ans += x x ans ans = 0 0 ans y = xy[i] xy[i] y N = I() I() N x = float(x) float(x) x
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり

N = I()
xy = [LS() for _ in range(N)]

ans = 0
for i in range(N):
    x,y = xy[i]
    x = float(x)
    if y == 'JPY':
        ans += x
    else:
        ans += 380000*x

print(ans)