import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)
N = int(input())
ans = 0
for n in range(N):
    x, u = map(str, input().split())
    x = float(x)
    if not u=='JPY':
        x *= 380000.0
    ans += x
print(ans) import sys sys def input(): return sys.stdin.readline().strip() input def mapint(): return map(int, input().split()) mapint sys.setrecursionlimit(10**9) sys.setrecursionlimit sys setrecursionlimit 10**9 10 9 N = int(input()) N int(input()) int input() input ans = 0 ans 0 for n in range(N):
    x, u = map(str, input().split())
    x = float(x)
    if not u=='JPY':
        x *= 380000.0
    ans += x n range(N) range N x, u = map(str, input().split()) x map(str, input().split()) map str input().split() ().split () input split u x = float(x) x float(x) float x if not u=='JPY':
        x *= 380000.0
     not u=='JPY' u=='JPY' u 'JPY' x *= 380000.0 x 380000.0 ans += x ans x print(ans) print ans def mapint(): return map(int, input().split()) def mapint(): return map(int, input().split()) mapint u = map(str, input().split()) map(str, input().split()) u def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input ans += x x ans N = int(input()) int(input()) N x, u = map(str, input().split()) map(str, input().split()) x ans = 0 0 ans x *= 380000.0 380000.0 x x = float(x) float(x) x
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)
N = int(input())
ans = 0
for n in range(N):
    x, u = map(str, input().split())
    x = float(x)
    if not u=='JPY':
        x *= 380000.0
    ans += x
print(ans)