rot = {

    "North": (1,5,2,3,0,4),

    "East" : (3,1,0,5,4,2),

    "West" : (2,1,5,0,4,3),

    "South": (4,0,2,3,5,1),

    "Right": (0,2,4,1,3,5),

    "Left" : (0,3,1,4,2,5)

}

while 1:

    n = eval(input())

    if not n:

        break

    dice = [1,2,3,4,5,6]

    nxt = [0]*6

    ans = 0

    for i in range(n):

        r = rot[input()]

        for i in range(6):

            nxt[i] = dice[r[i]]

        dice, nxt = nxt, dice

        ans += dice[0]

    print(ans+1)
rot = {

    "North": (1,5,2,3,0,4),

    "East" : (3,1,0,5,4,2),

    "West" : (2,1,5,0,4,3),

    "South": (4,0,2,3,5,1),

    "Right": (0,2,4,1,3,5),

    "Left" : (0,3,1,4,2,5)

}

while 1:

    n = eval(input())

    if not n:

        break

    dice = [1,2,3,4,5,6]

    nxt = [0]*6

    ans = 0

    for i in range(n):

        r = rot[input()]

        dice = [dice[r[i]] for i in range(6)]

        ans += dice[0]

    print(ans+1)
rot = {
    "North": (1, 5, 2, 3, 0, 4),
    "East": (3, 1, 0, 5, 4, 2),
    "West": (2, 1, 5, 0, 4, 3),
    "South": (4, 0, 2, 3, 5, 1),
    "Right": (0, 2, 4, 1, 3, 5),
    "Left": (0, 3, 1, 4, 2, 5),
}
while 1:
    n = eval(input())
    if not n:
        break
    dice = [1, 2, 3, 4, 5, 6]
    nxt = [0] * 6
    ans = 0
    for i in range(n):
        r = rot[input()]
        for i in range(6):
            nxt[i] = dice[r[i]]
        dice, nxt = nxt, dice
        ans += dice[0]
    print(ans + 1)

rot = {
    "North": (1, 5, 2, 3, 0, 4),
    "East": (3, 1, 0, 5, 4, 2),
    "West": (2, 1, 5, 0, 4, 3),
    "South": (4, 0, 2, 3, 5, 1),
    "Right": (0, 2, 4, 1, 3, 5),
    "Left": (0, 3, 1, 4, 2, 5),
}
while 1:
    n = eval(input())
    if not n:
        break
    dice = [1, 2, 3, 4, 5, 6]
    nxt = [0] * 6
    ans = 0
    for i in range(n):
        r = rot[input()]
        dice = [dice[r[i]] for i in range(6)]
        ans += dice[0]
    print(ans + 1)

-        for i in range(6): -            nxt[i] = dice[r[i]] -        dice, nxt = nxt, dice +        dice = [dice[r[i]] for i in range(6)]