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 si — 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.

Examples

Input

4
Icosahedron
Cube
Tetrahedron
Dodecahedron


Output

42


Input

3
Dodecahedron
Octahedron
Octahedron


Output

28

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.

def gcd(a,b):
    if a<b: return gcd(b,a)

    if a%b==0: return b
    return gcd(b,a%b)



def sol():
    inp = list(map(int, raw_input().split()))
    n,k = inp[0],inp[1]

    st = list(map(int, raw_input().split()))
    vals = []

    minv = st[0]
    for i in range(1,n): 
        minv = min(st[i],minv)

    for i in range(0,n):
        if st[i]-minv !=0:
            vals.append(st[i]-minv)

    if len(vals)==0:
        print 0
        return

    agcd = vals[0]
    for i in range(0,len(vals)):
        if vals[i] !=0:
            agcd = gcd(agcd,vals[i])

    if agcd%k!=0:
        print -1
        return

    sol = 0
    for i in range(0,n): 
        sol += ( st[i] - minv)/k
    print sol

def ws():
    n = input()
    st = list(map(int, raw_input().split()))

    odd = []
    asum = 0

    for i in range(0,n):
        asum += st[i]
        if st[i]%2!=0:
            odd.append(st[i])

    if(len(odd)%2!=0):
        odd.sort()
        asum -= odd[0]

    print asum

def pl():
    astr = raw_input()
    
    sol = 0
    for i in range(0,len(astr)/2):
        if astr[i]!= astr[len(astr)-(1+i)]:
            sol +=1

    if sol==1 or (sol==0 and len(astr)%2!=0):
        print "YES"
    else:
        print "NO"

def palin():
    astr = raw_input()
    sol =0
    op = 0
    for i in range(0,len(astr)-1):
        if astr[i] == 'V' and astr[i+1] == 'K':
            sol += 1
        elif i>0 and astr[i-1] == 'K' and astr[i] == 'K' and astr[i+1] == 'K':
            op +=1
        elif i>0 and astr[i-1] == 'V' and astr[i] == 'V' and astr[i+1] == 'V':
            op +=1
        
    
    if len(astr)==1:
        print 0
    else:
        if astr[0]=='K' and astr[1]=='K': op += 1
        if astr[len(astr)-1]=='V' and astr[len(astr)-2]=='V': op += 1
    
        if astr=='VV': op += 1
        if op!=0: sol += 1
        print sol

def nos(a):
    if a=='Tetrahedron': return 4
    if a=='Cube': return 6
    if a=='Octahedron': return 8
    if a=='Dodecahedron': return 12
    if a=='Icosahedron': return 20
    return 0


def hed():
    t = int(raw_input())
    sol = 0
    #print t
    for i in range(0,t):
        astr = raw_input()
        sol += nos(astr)

    print sol

hed()
#sol()


