def solve():
    n = int(input())
    ans = 0
    for i in range(n):
        x, u = input().split()
        x = float(x)
        if u == 'JPY':
            ans += x
        else:
            ans += x * 380000
    print(ans)



if __name__ == '__main__':
    solve() def solve():
    n = int(input())
    ans = 0
    for i in range(n):
        x, u = input().split()
        x = float(x)
        if u == 'JPY':
            ans += x
        else:
            ans += x * 380000
    print(ans) solve n = int(input()) n int(input()) int input() input ans = 0 ans 0 for i in range(n):
        x, u = input().split()
        x = float(x)
        if u == 'JPY':
            ans += x
        else:
            ans += x * 380000
     i range(n) range n x, u = input().split() x input().split() ().split () input split u x = float(x) x float(x) float x if u == 'JPY':
            ans += x
        else:
            ans += x * 380000
     u == 'JPY' u 'JPY' ans += x ans x ans += x * 380000 ans x * 380000 x 380000 print(ans) print ans if __name__ == '__main__':
    solve() __name__ == '__main__' __name__ '__main__' solve() solve def solve():
    n = int(input())
    ans = 0
    for i in range(n):
        x, u = input().split()
        x = float(x)
        if u == 'JPY':
            ans += x
        else:
            ans += x * 380000
    print(ans) def solve():
    n = int(input())
    ans = 0
    for i in range(n):
        x, u = input().split()
        x = float(x)
        if u == 'JPY':
            ans += x
        else:
            ans += x * 380000
    print(ans) solve
def solve():
    n = int(input())
    ans = 0
    for i in range(n):
        x, u = input().split()
        x = float(x)
        if u == 'JPY':
            ans += x
        else:
            ans += x * 380000
    print(ans)



if __name__ == '__main__':
    solve()
