Under construction

Still being built. Things may change

Chili Peppers

Time limit1sMemory limit1024 MB

Summary
Sums the SHU values of the peppers named in the input, using a fixed lookup table of six pepper types.
Level

Easy1 of 10

Topics
Implementation, Hash map
Solved
No attempts yet

Problem

Ron is cooking chili using an assortment of peppers.

The spiciness of a pepper is measured in Scoville Heat Units (SHU). Ron's chili is currently not spicy at all, but each time Ron adds a pepper, the total spiciness of the chili increases by the SHU value of that pepper.

The SHU values of the peppers available to Ron are shown in the following table:

Pepper NameScoville Heat Units
Poblano1500
Mirasol6000
Serrano15500
Cayenne40000
Thai75000
Habanero125000

Your job is to determine the total spiciness of Ron's chili after he has finished adding peppers.

Input

The first line of input contains a positive integer NN, the number of peppers Ron adds to his chili. The next NN lines each contain the name of a pepper Ron has added. Each pepper name exactly matches a name in the table above. The same pepper can be added more than once.

Output

Print a positive integer TT, the total spiciness of Ron's chili.

Examples1

  1. Example 1

    Input
    4
    Poblano
    Cayenne
    Thai
    Poblano
    
    Expected output
    118000