#! /usr/bin/env python3

# -*- coding: utf-8 -*-



N = int(eval(input()))



answer = 0

for _ in range(N):

    x,u = input().split()

    if u == "JPY":

        money = float(x) 

    else:

        money = float(x)*380000.0

    answer += money

print(answer)



#! /usr/bin/env python3

# -*- coding: utf-8 -*-



N = int(eval(input()))



answer = 0

for _ in range(N):

    x,u = input().split()

    if u == "JPY":

        money = int(x) 

    else:

        money = float(x)*380000.0

    answer += money

print(answer)

#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(eval(input()))
answer = 0
for _ in range(N):
    x, u = input().split()
    if u == "JPY":
        money = float(x)
    else:
        money = float(x) * 380000.0
    answer += money
print(answer)

#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(eval(input()))
answer = 0
for _ in range(N):
    x, u = input().split()
    if u == "JPY":
        money = int(x)
    else:
        money = float(x) * 380000.0
    answer += money
print(answer)

-        money = float(x) +        money = int(x)