N = int(input())
K = 380000
ans = 0
import decimal
for _ in range(N):
    x, u = input().split()
    if u == "BTC":
        ans += K * decimal.Decimal(x)
    else:
        ans += int(x)
print(ans) N = int(input()) N int(input()) int input() input K = 380000 K 380000 ans = 0 ans 0 import decimal decimal for _ in range(N):
    x, u = input().split()
    if u == "BTC":
        ans += K * decimal.Decimal(x)
    else:
        ans += int(x) _ range(N) range N x, u = input().split() x input().split() ().split () input split u if u == "BTC":
        ans += K * decimal.Decimal(x)
    else:
        ans += int(x) u == "BTC" u "BTC" ans += K * decimal.Decimal(x) ans K * decimal.Decimal(x) K decimal.Decimal(x) decimal.Decimal decimal Decimal x ans += int(x) ans int(x) int x print(ans) print ans N = int(input()) int(input()) N ans += int(x) int(x) ans u = input().split() input().split() u ans = 0 0 ans x, u = input().split() input().split() x ans += K * decimal.Decimal(x) K * decimal.Decimal(x) ans K = 380000 380000 K
N = int(input())
K = 380000
ans = 0
import decimal
for _ in range(N):
    x, u = input().split()
    if u == "BTC":
        ans += K * decimal.Decimal(x)
    else:
        ans += int(x)
print(ans)