def mi():
    return map(int, input().split())

def main():
    N = int(input())
    s = 0
    for _ in range(N):
        x, u = input().split()
        x = float(x)*(1 if u == 'JPY' else 380000.0)
        s += x

    print(s)


if __name__ == '__main__':
    main() def mi():
    return map(int, input().split()) mi return map(int, input().split()) map(int, input().split()) map int input().split() ().split () input split def main():
    N = int(input())
    s = 0
    for _ in range(N):
        x, u = input().split()
        x = float(x)*(1 if u == 'JPY' else 380000.0)
        s += x

    print(s) main N = int(input()) N int(input()) int input() input s = 0 s 0 for _ in range(N):
        x, u = input().split()
        x = float(x)*(1 if u == 'JPY' else 380000.0)
        s += x

     _ range(N) range N x, u = input().split() x input().split() ().split () input split u x = float(x)*(1 if u == 'JPY' else 380000.0) x float(x)*(1 if u == 'JPY' else 380000.0) float(x) float x 1 if u == 'JPY' else 380000.0 u == 'JPY' u 'JPY' 1 380000.0 s += x s x print(s) print s if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def mi():
    return map(int, input().split()) def mi():
    return map(int, input().split()) mi def main():
    N = int(input())
    s = 0
    for _ in range(N):
        x, u = input().split()
        x = float(x)*(1 if u == 'JPY' else 380000.0)
        s += x

    print(s) def main():
    N = int(input())
    s = 0
    for _ in range(N):
        x, u = input().split()
        x = float(x)*(1 if u == 'JPY' else 380000.0)
        s += x

    print(s) main
def mi():
    return map(int, input().split())

def main():
    N = int(input())
    s = 0
    for _ in range(N):
        x, u = input().split()
        x = float(x)*(1 if u == 'JPY' else 380000.0)
        s += x

    print(s)


if __name__ == '__main__':
    main()