#import sys
#import numpy as np
#import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
n=int(input())
ans=0
for i in range(n):
    x,u=input().split()
    if u=="BTC":
        x=float(x)
        ans+=380000*x
    else:
        x=int(x)
        ans+=x
print(ans) from collections import deque n=int(input()) n int(input()) int input() input ans=0 ans 0 for i in range(n):
    x,u=input().split()
    if u=="BTC":
        x=float(x)
        ans+=380000*x
    else:
        x=int(x)
        ans+=x i range(n) range n x,u=input().split() x input().split() ().split () input split u if u=="BTC":
        x=float(x)
        ans+=380000*x
    else:
        x=int(x)
        ans+=x u=="BTC" u "BTC" x=float(x) x float(x) float x ans+=380000*x ans 380000*x 380000 x x=int(x) x int(x) int x ans+=x ans x print(ans) print ans ans=0 0 ans x,u=input().split() input().split() x u=input().split() input().split() u ans+=x x ans n=int(input()) int(input()) n ans+=380000*x 380000*x ans x=float(x) float(x) x x=int(x) int(x) x
#import sys
#import numpy as np
#import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
n=int(input())
ans=0
for i in range(n):
    x,u=input().split()
    if u=="BTC":
        x=float(x)
        ans+=380000*x
    else:
        x=int(x)
        ans+=x
print(ans)