N = int(input())
xu = []
for i in range(N):
    xu.append(input().split())

answer = 0
for i in range(N):
    if xu[i][1] == 'JPY':
        answer += int(xu[i][0])
    else:
        answer += float(xu[i][0]) * 380000.0
print(answer) N = int(input()) N int(input()) int input() input xu = [] xu [] for i in range(N):
    xu.append(input().split()) i range(N) range N xu.append(input().split()) xu.append xu append input().split() ().split () input split answer = 0 answer 0 for i in range(N):
    if xu[i][1] == 'JPY':
        answer += int(xu[i][0])
    else:
        answer += float(xu[i][0]) * 380000.0 i range(N) range N if xu[i][1] == 'JPY':
        answer += int(xu[i][0])
    else:
        answer += float(xu[i][0]) * 380000.0 xu[i][1] == 'JPY' xu[i][1] [i] xu i 1 'JPY' answer += int(xu[i][0]) answer int(xu[i][0]) int xu[i][0] [i] xu i 0 answer += float(xu[i][0]) * 380000.0 answer float(xu[i][0]) * 380000.0 float(xu[i][0]) float xu[i][0] [i] xu i 0 380000.0 print(answer) print answer answer = 0 0 answer answer += int(xu[i][0]) int(xu[i][0]) answer answer += float(xu[i][0]) * 380000.0 float(xu[i][0]) * 380000.0 answer N = int(input()) int(input()) N xu = [] [] xu
N = int(input())
xu = []
for i in range(N):
    xu.append(input().split())

answer = 0
for i in range(N):
    if xu[i][1] == 'JPY':
        answer += int(xu[i][0])
    else:
        answer += float(xu[i][0]) * 380000.0
print(answer)