import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    n = ni()
    m = [tuple(input().split()) for _ in range(n)]
    btc_to_jpy = 380000
    ans = 0
    for price, kind in m:
        if kind == 'JPY':
            ans += int(price)
        else:
            ans += btc_to_jpy * float(price)
    print(ans)


if __name__ == '__main__':
    main() import sys sys stdin = sys.stdin stdin sys.stdin sys stdin def ns(): return stdin.readline().rstrip() ns def ni(): return int(stdin.readline().rstrip()) ni def nm(): return map(int, stdin.readline().split()) nm def nl(): return list(map(int, stdin.readline().split())) nl def main():
    n = ni()
    m = [tuple(input().split()) for _ in range(n)]
    btc_to_jpy = 380000
    ans = 0
    for price, kind in m:
        if kind == 'JPY':
            ans += int(price)
        else:
            ans += btc_to_jpy * float(price)
    print(ans) main n = ni() n ni() ni tuple(input().split()) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) tuple(input().split()) tuple input().split() ().split () input split m = [tuple(input().split()) for _ in range(n)] m [tuple(input().split()) for _ in range(n)] btc_to_jpy = 380000 btc_to_jpy 380000 ans = 0 ans 0 for price, kind in m:
        if kind == 'JPY':
            ans += int(price)
        else:
            ans += btc_to_jpy * float(price)
     price kind m if kind == 'JPY':
            ans += int(price)
        else:
            ans += btc_to_jpy * float(price)
     kind == 'JPY' kind 'JPY' ans += int(price) ans int(price) int price ans += btc_to_jpy * float(price) ans btc_to_jpy * float(price) btc_to_jpy float(price) float price print(ans) print ans if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def ni(): return int(stdin.readline().rstrip()) def ni(): return int(stdin.readline().rstrip()) ni def nl(): return list(map(int, stdin.readline().split())) def nl(): return list(map(int, stdin.readline().split())) nl def ns(): return stdin.readline().rstrip() def ns(): return stdin.readline().rstrip() ns def nm(): return map(int, stdin.readline().split()) def nm(): return map(int, stdin.readline().split()) nm def main():
    n = ni()
    m = [tuple(input().split()) for _ in range(n)]
    btc_to_jpy = 380000
    ans = 0
    for price, kind in m:
        if kind == 'JPY':
            ans += int(price)
        else:
            ans += btc_to_jpy * float(price)
    print(ans) def main():
    n = ni()
    m = [tuple(input().split()) for _ in range(n)]
    btc_to_jpy = 380000
    ans = 0
    for price, kind in m:
        if kind == 'JPY':
            ans += int(price)
        else:
            ans += btc_to_jpy * float(price)
    print(ans) main stdin = sys.stdin sys.stdin stdin
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    n = ni()
    m = [tuple(input().split()) for _ in range(n)]
    btc_to_jpy = 380000
    ans = 0
    for price, kind in m:
        if kind == 'JPY':
            ans += int(price)
        else:
            ans += btc_to_jpy * float(price)
    print(ans)


if __name__ == '__main__':
    main()
