def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    n = int(input())
    res = 0
    for _ in range(n):
        x, u = input().rstrip().split()
        x = float(x)
        if u=='JPY':
            res += x
        else:
            res += x*380000
    print(res)

if __name__ == '__main__':
    main() def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    n = int(input())
    res = 0
    for _ in range(n):
        x, u = input().rstrip().split()
        x = float(x)
        if u=='JPY':
            res += x
        else:
            res += x*380000
    print(res) main import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 from collections import Counter, deque from itertools import combinations, permutations, accumulate, groupby, product from bisect import bisect_left,bisect_right from heapq import heapify, heappop, heappush from math import floor, ceil n = int(input()) n int(input()) int input() input res = 0 res 0 for _ in range(n):
        x, u = input().rstrip().split()
        x = float(x)
        if u=='JPY':
            res += x
        else:
            res += x*380000
     _ range(n) range n x, u = input().rstrip().split() x input().rstrip().split() ().rstrip().split ().rstrip() ().rstrip () input rstrip split u x = float(x) x float(x) float x if u=='JPY':
            res += x
        else:
            res += x*380000
     u=='JPY' u 'JPY' res += x res x res += x*380000 res x*380000 x 380000 print(res) print res if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    n = int(input())
    res = 0
    for _ in range(n):
        x, u = input().rstrip().split()
        x = float(x)
        if u=='JPY':
            res += x
        else:
            res += x*380000
    print(res) def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    n = int(input())
    res = 0
    for _ in range(n):
        x, u = input().rstrip().split()
        x = float(x)
        if u=='JPY':
            res += x
        else:
            res += x*380000
    print(res) main
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    n = int(input())
    res = 0
    for _ in range(n):
        x, u = input().rstrip().split()
        x = float(x)
        if u=='JPY':
            res += x
        else:
            res += x*380000
    print(res)

if __name__ == '__main__':
    main()