def main():
    N = int(input())
    x = []
    ans = 0
    for i in range(N):
        x.append(list(map(str, input().split(' '))))
    for i in range(N):
        if x[i][1] == 'BTC':
            ans = ans + (float(x[i][0])*380000)
        else:
            ans += float(x[i][0])
    print(ans)
main()
 def main():
    N = int(input())
    x = []
    ans = 0
    for i in range(N):
        x.append(list(map(str, input().split(' '))))
    for i in range(N):
        if x[i][1] == 'BTC':
            ans = ans + (float(x[i][0])*380000)
        else:
            ans += float(x[i][0])
    print(ans) main N = int(input()) N int(input()) int input() input x = [] x [] ans = 0 ans 0 for i in range(N):
        x.append(list(map(str, input().split(' '))))
     i range(N) range N x.append(list(map(str, input().split(' ')))) x.append x append list(map(str, input().split(' '))) list map(str, input().split(' ')) map str input().split(' ') ().split () input split ' ' for i in range(N):
        if x[i][1] == 'BTC':
            ans = ans + (float(x[i][0])*380000)
        else:
            ans += float(x[i][0])
     i range(N) range N if x[i][1] == 'BTC':
            ans = ans + (float(x[i][0])*380000)
        else:
            ans += float(x[i][0])
     x[i][1] == 'BTC' x[i][1] [i] x i 1 'BTC' ans = ans + (float(x[i][0])*380000) ans ans + (float(x[i][0])*380000) ans float(x[i][0])*380000 float(x[i][0]) float x[i][0] [i] x i 0 380000 ans += float(x[i][0]) ans float(x[i][0]) float x[i][0] [i] x i 0 print(ans) print ans main() main def main():
    N = int(input())
    x = []
    ans = 0
    for i in range(N):
        x.append(list(map(str, input().split(' '))))
    for i in range(N):
        if x[i][1] == 'BTC':
            ans = ans + (float(x[i][0])*380000)
        else:
            ans += float(x[i][0])
    print(ans) def main():
    N = int(input())
    x = []
    ans = 0
    for i in range(N):
        x.append(list(map(str, input().split(' '))))
    for i in range(N):
        if x[i][1] == 'BTC':
            ans = ans + (float(x[i][0])*380000)
        else:
            ans += float(x[i][0])
    print(ans) main
def main():
    N = int(input())
    x = []
    ans = 0
    for i in range(N):
        x.append(list(map(str, input().split(' '))))
    for i in range(N):
        if x[i][1] == 'BTC':
            ans = ans + (float(x[i][0])*380000)
        else:
            ans += float(x[i][0])
    print(ans)
main()

