import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N = int(readline())

    ans = 0
    rate = 380000.0
    for _ in range(N):
        x, u = readline().split()
        if u == 'JPY':
            ans += int(x)
        else:
            ans += float(x) * rate

    print(ans)
    return


if __name__ == '__main__':
    main() import sys sys read = sys.stdin.read read sys.stdin.read sys.stdin sys stdin read readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline readlines = sys.stdin.readlines readlines sys.stdin.readlines sys.stdin sys stdin readlines sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 INF = 1 << 60 INF 1 << 60 1 60 MOD = 1000000007 MOD 1000000007 def main():
    N = int(readline())

    ans = 0
    rate = 380000.0
    for _ in range(N):
        x, u = readline().split()
        if u == 'JPY':
            ans += int(x)
        else:
            ans += float(x) * rate

    print(ans)
    return main N = int(readline()) N int(readline()) int readline() readline ans = 0 ans 0 rate = 380000.0 rate 380000.0 for _ in range(N):
        x, u = readline().split()
        if u == 'JPY':
            ans += int(x)
        else:
            ans += float(x) * rate

     _ range(N) range N x, u = readline().split() x readline().split() ().split () readline split u if u == 'JPY':
            ans += int(x)
        else:
            ans += float(x) * rate

     u == 'JPY' u 'JPY' ans += int(x) ans int(x) int x ans += float(x) * rate ans float(x) * rate float(x) float x rate print(ans) print ans return if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main INF = 1 << 60 1 << 60 INF readline = sys.stdin.readline sys.stdin.readline readline def main():
    N = int(readline())

    ans = 0
    rate = 380000.0
    for _ in range(N):
        x, u = readline().split()
        if u == 'JPY':
            ans += int(x)
        else:
            ans += float(x) * rate

    print(ans)
    return def main():
    N = int(readline())

    ans = 0
    rate = 380000.0
    for _ in range(N):
        x, u = readline().split()
        if u == 'JPY':
            ans += int(x)
        else:
            ans += float(x) * rate

    print(ans)
    return main readlines = sys.stdin.readlines sys.stdin.readlines readlines read = sys.stdin.read sys.stdin.read read MOD = 1000000007 1000000007 MOD
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N = int(readline())

    ans = 0
    rate = 380000.0
    for _ in range(N):
        x, u = readline().split()
        if u == 'JPY':
            ans += int(x)
        else:
            ans += float(x) * rate

    print(ans)
    return


if __name__ == '__main__':
    main()
