#!/usr/bin/env python3
import sys
try:
    from typing import List
except ImportError:
    pass


def solve(N: int, x: "List[float]", u: "List[str]"):
    rate = 380000.0
    print(sum(xi * (rate if ui == "BTC" else 1.0) for xi, ui in zip(x, u)))


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    x = [float()] * (N)  # type: "List[float]"
    u = [str()] * (N)  # type: "List[str]"
    for i in range(N):
        x[i] = float(next(tokens))
        u[i] = next(tokens)
    solve(N, x, u)


if __name__ == '__main__':
    main() import sys sys try:
    from typing import List
except ImportError:
    pass except ImportError:
    pass from typing import List def solve(N: int, x: "List[float]", u: "List[str]"):
    rate = 380000.0
    print(sum(xi * (rate if ui == "BTC" else 1.0) for xi, ui in zip(x, u))) solve rate = 380000.0 rate 380000.0 print(sum(xi * (rate if ui == "BTC" else 1.0) for xi, ui in zip(x, u))) print sum(xi * (rate if ui == "BTC" else 1.0) for xi, ui in zip(x, u)) sum xi * (rate if ui == "BTC" else 1.0) xi rate if ui == "BTC" else 1.0 ui == "BTC" ui "BTC" rate 1.0 N: int N x: "List[float]" x u: "List[str]" u def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    x = [float()] * (N)  # type: "List[float]"
    u = [str()] * (N)  # type: "List[str]"
    for i in range(N):
        x[i] = float(next(tokens))
        u[i] = next(tokens)
    solve(N, x, u) main def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
     iterate_tokens for line in sys.stdin:
            for word in line.split():
                yield word
     line sys.stdin sys stdin for word in line.split():
                yield word
     word line.split() line.split line split yield word word tokens = iterate_tokens() tokens iterate_tokens() iterate_tokens N = int(next(tokens)) N int(next(tokens)) int next(tokens) next tokens x = [float()] * (N) x [float()] * (N) [float()] float() float N u = [str()] * (N) u [str()] * (N) [str()] str() str N for i in range(N):
        x[i] = float(next(tokens))
        u[i] = next(tokens)
     i range(N) range N x[i] = float(next(tokens)) x[i] x i float(next(tokens)) float next(tokens) next tokens u[i] = next(tokens) u[i] u i next(tokens) next tokens solve(N, x, u) solve N x u if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def solve(N: int, x: "List[float]", u: "List[str]"):
    rate = 380000.0
    print(sum(xi * (rate if ui == "BTC" else 1.0) for xi, ui in zip(x, u))) def solve(N: int, x: "List[float]", u: "List[str]"):
    rate = 380000.0
    print(sum(xi * (rate if ui == "BTC" else 1.0) for xi, ui in zip(x, u))) solve def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    x = [float()] * (N)  # type: "List[float]"
    u = [str()] * (N)  # type: "List[str]"
    for i in range(N):
        x[i] = float(next(tokens))
        u[i] = next(tokens)
    solve(N, x, u) def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    x = [float()] * (N)  # type: "List[float]"
    u = [str()] * (N)  # type: "List[str]"
    for i in range(N):
        x[i] = float(next(tokens))
        u[i] = next(tokens)
    solve(N, x, u) main
#!/usr/bin/env python3
import sys
try:
    from typing import List
except ImportError:
    pass


def solve(N: int, x: "List[float]", u: "List[str]"):
    rate = 380000.0
    print(sum(xi * (rate if ui == "BTC" else 1.0) for xi, ui in zip(x, u)))


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    x = [float()] * (N)  # type: "List[float]"
    u = [str()] * (N)  # type: "List[str]"
    for i in range(N):
        x[i] = float(next(tokens))
        u[i] = next(tokens)
    solve(N, x, u)


if __name__ == '__main__':
    main()
