import sys import math import random import os total_sum = 0.0 for x in range(int(input())): item_name = input() if item_name == "treadmill": total_sum += 5899 elif item_name == "cross trainer": total_sum += 1699 elif item_name == "exercise bike": total_sum += 1789 elif item_name == "dumbells": total_sum += 579 else: print("ERROR, Invalid product name") print(round(total_sum, 2))