using System;

namespace Dice0503
{
    class Program
    {
        static void Main(string[] args)
        {


            while (true)
            {
                int length = Convert.ToInt32(Console.ReadLine());

                if (length == 0) break;

                Dice dice = new Dice();
                int sum = dice.Top;

                for (int i = 0; i < length; i++)
                {
                    String input = Console.ReadLine();

                    switch (input)
                    {
                        case "North":
                            dice.North();
                            break;
                        case "East":
                            dice.East();
                            break;
                        case "West":
                            dice.West();
                            break;
                        case "South":
                            dice.South();
                            break;
                        case "Right":
                            dice.RightRotation();
                            break;
                        case "Left":
                            dice.LeftRotation();
                            break;
                        default:
                            break;
                    }

                    sum += dice.Top;
                }

                Console.WriteLine(sum);
            }
        }
    }


    public class Dice
    {
        public int Top
        {
            get;
            protected set;
        }
        public int Bottom
        {
            get;
            protected set;
        }
        public int Front
        {
            get;
            protected set;
        }
        public int Back
        {
            get;
            protected set;
        }
        public int Left
        {
            get;
            protected set;
        }
        public int Right
        {
            get;
            protected set;
        }

        public Dice()
        {
            Top     = 1;
            Front   = 2;
            Right   = 3;
            Left    = 4;
            Back    = 5;
            Bottom  = 6;
        }

        public void North()
        {
            int temp = Top;
            Top = Front;
            Front = Bottom;
            Bottom = Back;
            Back = temp;
        }

        public void East()
        {
            int temp = Top;
            Top = Left;
            Left = Bottom;
            Bottom = Right;
            Right = temp;
        }

        public void West()
        {
            int temp = Top;
            Top = Right;
            Right = Bottom;
            Bottom = Left;
            Left = temp;
        }

        public void South()
        {
            int temp = Top;
            Top = Back;
            Back = Bottom;
            Bottom = Front;
            Front = temp;
        }

        public void RightRotation()
        {
            int temp = Front;
            Front = Right;
            Right = Back;
            Back = Left;
            Left = temp;
        }
        public void LeftRotation()
        {
            int temp = Front;
            Front = Left;
            Left = Back;
            Back = Right;
            Right = temp;
        }
    }
}

Measured memory_bytes: 5872