def main():
    N = int(input())
    money = [input().split() for i in range(N)]
    total = 0
    for i in range(N):
        [x, u] = money[i]
        if u == "JPY":
            total += float(x)
        else:
            total += float(x)*380000.0
    print(total)
main() def main():
    N = int(input())
    money = [input().split() for i in range(N)]
    total = 0
    for i in range(N):
        [x, u] = money[i]
        if u == "JPY":
            total += float(x)
        else:
            total += float(x)*380000.0
    print(total) main N = int(input()) N int(input()) int input() input input().split() for i in range(N) for i in range(N) i range(N) range N for i in range(N) input().split() ().split () input split money = [input().split() for i in range(N)] money [input().split() for i in range(N)] total = 0 total 0 for i in range(N):
        [x, u] = money[i]
        if u == "JPY":
            total += float(x)
        else:
            total += float(x)*380000.0
     i range(N) range N [x, u] = money[i] [x, u] x u money[i] money i if u == "JPY":
            total += float(x)
        else:
            total += float(x)*380000.0
     u == "JPY" u "JPY" total += float(x) total float(x) float x total += float(x)*380000.0 total float(x)*380000.0 float(x) float x 380000.0 print(total) print total main() main def main():
    N = int(input())
    money = [input().split() for i in range(N)]
    total = 0
    for i in range(N):
        [x, u] = money[i]
        if u == "JPY":
            total += float(x)
        else:
            total += float(x)*380000.0
    print(total) def main():
    N = int(input())
    money = [input().split() for i in range(N)]
    total = 0
    for i in range(N):
        [x, u] = money[i]
        if u == "JPY":
            total += float(x)
        else:
            total += float(x)*380000.0
    print(total) main
def main():
    N = int(input())
    money = [input().split() for i in range(N)]
    total = 0
    for i in range(N):
        [x, u] = money[i]
        if u == "JPY":
            total += float(x)
        else:
            total += float(x)*380000.0
    print(total)
main()