
def solve():

    N = int(input())
    xlist = []

    for i in range(N):
        x, u = input().split()
        x = float(x)
        if u == "BTC":
            xlist.append(x*380000.0)
        else:
            xlist.append(x)

    print(sum(xlist))


if __name__ == "__main__":
    solve() def solve():

    N = int(input())
    xlist = []

    for i in range(N):
        x, u = input().split()
        x = float(x)
        if u == "BTC":
            xlist.append(x*380000.0)
        else:
            xlist.append(x)

    print(sum(xlist)) solve N = int(input()) N int(input()) int input() input xlist = [] xlist [] for i in range(N):
        x, u = input().split()
        x = float(x)
        if u == "BTC":
            xlist.append(x*380000.0)
        else:
            xlist.append(x)

     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 == "BTC":
            xlist.append(x*380000.0)
        else:
            xlist.append(x)

     u == "BTC" u "BTC" xlist.append(x*380000.0) xlist.append xlist append x*380000.0 x 380000.0 xlist.append(x) xlist.append xlist append x print(sum(xlist)) print sum(xlist) sum xlist if __name__ == "__main__":
    solve() __name__ == "__main__" __name__ "__main__" solve() solve def solve():

    N = int(input())
    xlist = []

    for i in range(N):
        x, u = input().split()
        x = float(x)
        if u == "BTC":
            xlist.append(x*380000.0)
        else:
            xlist.append(x)

    print(sum(xlist)) def solve():

    N = int(input())
    xlist = []

    for i in range(N):
        x, u = input().split()
        x = float(x)
        if u == "BTC":
            xlist.append(x*380000.0)
        else:
            xlist.append(x)

    print(sum(xlist)) solve

def solve():

    N = int(input())
    xlist = []

    for i in range(N):
        x, u = input().split()
        x = float(x)
        if u == "BTC":
            xlist.append(x*380000.0)
        else:
            xlist.append(x)

    print(sum(xlist))


if __name__ == "__main__":
    solve()
