Codeforces Round 404 (Div. 2)
A
Anton and Polyhedrons
Codeforces
800
原题
←B →
翻译中…

Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:

翻译中…
  • Tetrahedron. Tetrahedron has $4$ triangular faces.
  • Cube. Cube has $6$ square faces.
  • Octahedron. Octahedron has $8$ triangular faces.
  • Dodecahedron. Dodecahedron has $12$ pentagonal faces.
  • Icosahedron. Icosahedron has $20$ triangular faces.
翻译中…

All five kinds of polyhedrons are shown on the picture below:

翻译中…

image

翻译中…

Anton has a collection of $*n*$ polyhedrons. One day he decided to know, how many faces his polyhedrons have in total. Help Anton and find this number!

翻译中…

Input

翻译中…

The first line of the input contains a single integer $*n*$ $(1 ≤ *n* ≤ 200 000)$ — the number of polyhedrons in Anton's collection.

翻译中…

Each of the following $*n*$ lines of the input contains a string $*s*_{*i*}$ — the name of the $*i*$-th polyhedron in Anton's collection. The string can look like this:

翻译中…
  • "Tetrahedron" (without quotes), if the $*i*$-th polyhedron in Anton's collection is a tetrahedron.
  • "Cube" (without quotes), if the $*i*$-th polyhedron in Anton's collection is a cube.
  • "Octahedron" (without quotes), if the $*i*$-th polyhedron in Anton's collection is an octahedron.
  • "Dodecahedron" (without quotes), if the $*i*$-th polyhedron in Anton's collection is a dodecahedron.
  • "Icosahedron" (without quotes), if the $*i*$-th polyhedron in Anton's collection is an icosahedron.
翻译中…

Output

翻译中…

Output one number — the total number of faces in all the polyhedrons in Anton's collection.

翻译中…

Note

翻译中…

In the first sample Anton has one icosahedron, one cube, one tetrahedron and one dodecahedron. Icosahedron has $20$ faces, cube has $6$ faces, tetrahedron has $4$ faces and dodecahedron has $12$ faces. In total, they have $20 + 6 + 4 + 12 = 42$ faces.

翻译中…

样例

Input #1
4
Icosahedron
Cube
Tetrahedron
Dodecahedron
Output #1
42
InputCopy OutputCopy
Input #2
3
Dodecahedron
Octahedron
Octahedron
Output #2
28
InputCopy OutputCopy
题目信息
题号
785A
时间限制
2 s
内存限制
256 MB
标签
模拟
字符串

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。