def resolve():
    BTC = 380000.0
    N = int(input())
    sumA = 0
    for _ in range(N):
        x, u = input().split()
        if u == "JPY":
            sumA += int(x)
        else:
            sumA += float(x) * BTC
    print(sumA)


resolve() def resolve():
    BTC = 380000.0
    N = int(input())
    sumA = 0
    for _ in range(N):
        x, u = input().split()
        if u == "JPY":
            sumA += int(x)
        else:
            sumA += float(x) * BTC
    print(sumA) resolve BTC = 380000.0 BTC 380000.0 N = int(input()) N int(input()) int input() input sumA = 0 sumA 0 for _ in range(N):
        x, u = input().split()
        if u == "JPY":
            sumA += int(x)
        else:
            sumA += float(x) * BTC
     _ range(N) range N x, u = input().split() x input().split() ().split () input split u if u == "JPY":
            sumA += int(x)
        else:
            sumA += float(x) * BTC
     u == "JPY" u "JPY" sumA += int(x) sumA int(x) int x sumA += float(x) * BTC sumA float(x) * BTC float(x) float x BTC print(sumA) print sumA resolve() resolve def resolve():
    BTC = 380000.0
    N = int(input())
    sumA = 0
    for _ in range(N):
        x, u = input().split()
        if u == "JPY":
            sumA += int(x)
        else:
            sumA += float(x) * BTC
    print(sumA) def resolve():
    BTC = 380000.0
    N = int(input())
    sumA = 0
    for _ in range(N):
        x, u = input().split()
        if u == "JPY":
            sumA += int(x)
        else:
            sumA += float(x) * BTC
    print(sumA) resolve
def resolve():
    BTC = 380000.0
    N = int(input())
    sumA = 0
    for _ in range(N):
        x, u = input().split()
        if u == "JPY":
            sumA += int(x)
        else:
            sumA += float(x) * BTC
    print(sumA)


resolve()
