import java.util.*;
public class Solution {
    public static void main(String[] args) {
        
        Scanner s=new Scanner(System.in);
        int count=0;
        String directions []={"N","E","S","W"};
        int z=s.nextInt();
        int members=z;
    
        ArrayList<Integer> l =new ArrayList<Integer>();
        ArrayList<Integer> m =new ArrayList<Integer>();
        String n []=new String [z];
        for(int i=0;i<z;i++){
            l.add(i,s.nextInt());
            m.add(i,s.nextInt());
            n[i]=s.next();
        }
        for(int r=1;;r++){
            for(int i=0;i<z;i++){
               if(n[i].equals(directions[0])){m.add(i, m.get(i)-1);}
               if(n[i].equals(directions[1])){l.add(i, l.get(i)+1);}
               if(n[i].equals(directions[2])){m.add(i, m.get(i)+1);}
               if(n[i].equals(directions[3])){l.add(i, l.get(i)-1);}
               if(-10>m.get(i) || m.get(i)>10 ||-10>l.get(i) || l.get(i)>10){count=count+1;}
            }
            for(int i=0;i<z;i++){
                for(int j=0;j<z;j++){
                    if(j!=i && m.get(i)==m.get(j) && l.get(i)==l.get(j)){
                        members=members-2;
                        m.remove(i);
                        l.remove(i);                        
                        m.remove(j);
                        l.remove(j);
                        z=z-2;
                    }
                }
            }
            if(count==members){
                System.out.println(members);
                break;
            }
           
        
        }
        
    }
}