import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N = I()
    xu = [LSS() for _ in range(N)]

    ans = 0
    for x, u in xu:
        if u == 'JPY':
            ans += int(x)
        else:
            ans += float(x) * 380000

    print(ans)

if __name__ == '__main__':
    resolve() import bisect, collections, copy, heapq, itertools, math, string, sys bisect collections copy heapq itertools math string sys input = lambda: sys.stdin.readline().rstrip() input lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 INF = float('inf') INF float('inf') float 'inf' def I(): return int(input()) I def F(): return float(input()) F def SS(): return input() SS int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x def LI(): return [int(x) for x in input().split()] LI int(x)-1 for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x)-1 int(x) int x 1 def LI_(): return [int(x)-1 for x in input().split()] LI_ float(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() float(x) float x def LF(): return [float(x) for x in input().split()] LF def LSS(): return input().split() LSS def resolve():
    N = I()
    xu = [LSS() for _ in range(N)]

    ans = 0
    for x, u in xu:
        if u == 'JPY':
            ans += int(x)
        else:
            ans += float(x) * 380000

    print(ans) resolve N = I() N I() I LSS() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) LSS() LSS xu = [LSS() for _ in range(N)] xu [LSS() for _ in range(N)] ans = 0 ans 0 for x, u in xu:
        if u == 'JPY':
            ans += int(x)
        else:
            ans += float(x) * 380000

     x u xu if u == 'JPY':
            ans += int(x)
        else:
            ans += float(x) * 380000

     u == 'JPY' u 'JPY' ans += int(x) ans int(x) int x ans += float(x) * 380000 ans float(x) * 380000 float(x) float x 380000 print(ans) print ans if __name__ == '__main__':
    resolve() __name__ == '__main__' __name__ '__main__' resolve() resolve def LF(): return [float(x) for x in input().split()] def LF(): return [float(x) for x in input().split()] LF def F(): return float(input()) def F(): return float(input()) F INF = float('inf') float('inf') INF def I(): return int(input()) def I(): return int(input()) I def LI(): return [int(x) for x in input().split()] def LI(): return [int(x) for x in input().split()] LI def resolve():
    N = I()
    xu = [LSS() for _ in range(N)]

    ans = 0
    for x, u in xu:
        if u == 'JPY':
            ans += int(x)
        else:
            ans += float(x) * 380000

    print(ans) def resolve():
    N = I()
    xu = [LSS() for _ in range(N)]

    ans = 0
    for x, u in xu:
        if u == 'JPY':
            ans += int(x)
        else:
            ans += float(x) * 380000

    print(ans) resolve def LSS(): return input().split() def LSS(): return input().split() LSS input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input def SS(): return input() def SS(): return input() SS def LI_(): return [int(x)-1 for x in input().split()] def LI_(): return [int(x)-1 for x in input().split()] LI_
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N = I()
    xu = [LSS() for _ in range(N)]

    ans = 0
    for x, u in xu:
        if u == 'JPY':
            ans += int(x)
        else:
            ans += float(x) * 380000

    print(ans)

if __name__ == '__main__':
    resolve()
