import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    n = int(readline())
    ans = 0

    for i in range(n):
        x, u = input().split()
        if u == "JPY":
            ans += int(x)
        else:
            ans += 380000.0 * float(x)

    print(ans)

if __name__ == '__main__':
    main() import sys sys readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 INF = float('INF') INF float('INF') float 'INF' sys.setrecursionlimit(10 ** 5) sys.setrecursionlimit sys setrecursionlimit 10 ** 5 10 5 def main():
    n = int(readline())
    ans = 0

    for i in range(n):
        x, u = input().split()
        if u == "JPY":
            ans += int(x)
        else:
            ans += 380000.0 * float(x)

    print(ans) main n = int(readline()) n int(readline()) int readline() readline ans = 0 ans 0 for i in range(n):
        x, u = input().split()
        if u == "JPY":
            ans += int(x)
        else:
            ans += 380000.0 * float(x)

     i range(n) range n x, u = input().split() x input().split() ().split () input split u if u == "JPY":
            ans += int(x)
        else:
            ans += 380000.0 * float(x)

     u == "JPY" u "JPY" ans += int(x) ans int(x) int x ans += 380000.0 * float(x) ans 380000.0 * float(x) 380000.0 float(x) float x print(ans) print ans if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main INF = float('INF') float('INF') INF readline = sys.stdin.readline sys.stdin.readline readline MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD def main():
    n = int(readline())
    ans = 0

    for i in range(n):
        x, u = input().split()
        if u == "JPY":
            ans += int(x)
        else:
            ans += 380000.0 * float(x)

    print(ans) def main():
    n = int(readline())
    ans = 0

    for i in range(n):
        x, u = input().split()
        if u == "JPY":
            ans += int(x)
        else:
            ans += 380000.0 * float(x)

    print(ans) main
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    n = int(readline())
    ans = 0

    for i in range(n):
        x, u = input().split()
        if u == "JPY":
            ans += int(x)
        else:
            ans += 380000.0 * float(x)

    print(ans)

if __name__ == '__main__':
    main()
