import sys
import math
import bisect

def main():
    ans = 0
    for _ in range(int(input())):
        a, b = input().split()
        a = float(a)
        if b == 'JPY':
            ans += a
        elif b == 'BTC':
            ans += a * 380000
    print('%.10f' % ans)

if __name__ == "__main__":
    main() import sys sys import math math import bisect bisect def main():
    ans = 0
    for _ in range(int(input())):
        a, b = input().split()
        a = float(a)
        if b == 'JPY':
            ans += a
        elif b == 'BTC':
            ans += a * 380000
    print('%.10f' % ans) main ans = 0 ans 0 for _ in range(int(input())):
        a, b = input().split()
        a = float(a)
        if b == 'JPY':
            ans += a
        elif b == 'BTC':
            ans += a * 380000
     _ range(int(input())) range int(input()) int input() input a, b = input().split() a input().split() ().split () input split b a = float(a) a float(a) float a if b == 'JPY':
            ans += a
        elif b == 'BTC':
            ans += a * 380000
     b == 'JPY' b 'JPY' ans += a ans a elif b == 'BTC':
            ans += a * 380000
     b == 'BTC' b 'BTC' ans += a * 380000 ans a * 380000 a 380000 print('%.10f' % ans) print '%.10f' % ans '%.10f' ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    ans = 0
    for _ in range(int(input())):
        a, b = input().split()
        a = float(a)
        if b == 'JPY':
            ans += a
        elif b == 'BTC':
            ans += a * 380000
    print('%.10f' % ans) def main():
    ans = 0
    for _ in range(int(input())):
        a, b = input().split()
        a = float(a)
        if b == 'JPY':
            ans += a
        elif b == 'BTC':
            ans += a * 380000
    print('%.10f' % ans) main
import sys
import math
import bisect

def main():
    ans = 0
    for _ in range(int(input())):
        a, b = input().split()
        a = float(a)
        if b == 'JPY':
            ans += a
        elif b == 'BTC':
            ans += a * 380000
    print('%.10f' % ans)

if __name__ == "__main__":
    main()
