import java.util.*;
 
class MyStack {
    private Object stack[];
    private int stackSize;
    private int sp;
    private static final int DEFAULT_STACK_SIZE = 300000;
 
    public MyStack(){
        this(DEFAULT_STACK_SIZE);
    }
 
    public MyStack(int size){
        stack = new Object[size];
        stackSize = size;
        sp = 0;
    }
 
    public void clear(){
        Arrays.fill(stack,0,sp,null);
        sp = 0;
    }
 
    public void push(Object x){
        if(sp >= stackSize){
            throw new IllegalStateException("Stack overflow");
        }
        stack[sp++] = x;
    }
 
    public Object pop(){
        if(sp <= 0){
            throw new EmptyStackException();
        }
        Object value = stack[--sp];
        stack[sp] = null;
        return value;
    }
 
    public boolean isEmpty(){
        return sp == 0;
    }
 
    public String toString(){
        String s = "MyStack=[";
        for(int i = 0; i < sp; i++){
            s = s + stack[i];
            if(i < sp - 1){
                s = s + ",";
            }
        }
        s = s + "]";
        return s;
    }
    public int size(){
        return this.sp;
    }
    public String getTopObjectName(){
        String s = stack[--sp].toString();
        sp++;
        return s;
    }
}
public class Main {
    
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt(); 
        List<String> list = new ArrayList<String>();
        MyStack stack = new MyStack();
        
        for(int i = 0; i <= a; i++){
            String x = s.nextLine();
            list.add(x);
        }
        Collections.sort(list);
        stack.push(list.remove(0));
        for(int i = 0; i < list.size(); i++){
            String mo = list.get(i);
            if(mo.length() <= 10 && mo.length() >= 1 && !stack.getTopObjectName().equals(mo)){
                stack.push(mo);
            }
        }
        System.out.println(stack.size()-1);
    }
} import java.util.*; util.* java class MyStack {
    private Object stack[];
    private int stackSize;
    private int sp;
    private static final int DEFAULT_STACK_SIZE = 300000;
 
    public MyStack(){
        this(DEFAULT_STACK_SIZE);
    }
 
    public MyStack(int size){
        stack = new Object[size];
        stackSize = size;
        sp = 0;
    }
 
    public void clear(){
        Arrays.fill(stack,0,sp,null);
        sp = 0;
    }
 
    public void push(Object x){
        if(sp >= stackSize){
            throw new IllegalStateException("Stack overflow");
        }
        stack[sp++] = x;
    }
 
    public Object pop(){
        if(sp <= 0){
            throw new EmptyStackException();
        }
        Object value = stack[--sp];
        stack[sp] = null;
        return value;
    }
 
    public boolean isEmpty(){
        return sp == 0;
    }
 
    public String toString(){
        String s = "MyStack=[";
        for(int i = 0; i < sp; i++){
            s = s + stack[i];
            if(i < sp - 1){
                s = s + ",";
            }
        }
        s = s + "]";
        return s;
    }
    public int size(){
        return this.sp;
    }
    public String getTopObjectName(){
        String s = stack[--sp].toString();
        sp++;
        return s;
    }
} MyStack private Object stack[]; stack private int stackSize; stackSize private int sp; sp private static final int DEFAULT_STACK_SIZE = 300000; DEFAULT_STACK_SIZE 300000 public MyStack(){
        this(DEFAULT_STACK_SIZE);
    } MyStack {
        this(DEFAULT_STACK_SIZE);
    } this(DEFAULT_STACK_SIZE) this DEFAULT_STACK_SIZE public MyStack(int size){
        stack = new Object[size];
        stackSize = size;
        sp = 0;
    } MyStack {
        stack = new Object[size];
        stackSize = size;
        sp = 0;
    } stack = new Object[size] stack new Object[size] size stackSize = size stackSize size sp = 0 sp 0 int size size public void clear(){
        Arrays.fill(stack,0,sp,null);
        sp = 0;
    } clear {
        Arrays.fill(stack,0,sp,null);
        sp = 0;
    } Arrays.fill(stack,0,sp,null) Arrays.fill Arrays stack 0 sp null sp = 0 sp 0 public void push(Object x){
        if(sp >= stackSize){
            throw new IllegalStateException("Stack overflow");
        }
        stack[sp++] = x;
    } push {
        if(sp >= stackSize){
            throw new IllegalStateException("Stack overflow");
        }
        stack[sp++] = x;
    } if(sp >= stackSize){
            throw new IllegalStateException("Stack overflow");
        } sp >= stackSize sp stackSize {
            throw new IllegalStateException("Stack overflow");
        } throw new IllegalStateException("Stack overflow"); new IllegalStateException("Stack overflow") stack[sp++] = x stack[sp++] stack sp++ sp x Object x x public Object pop(){
        if(sp <= 0){
            throw new EmptyStackException();
        }
        Object value = stack[--sp];
        stack[sp] = null;
        return value;
    } pop {
        if(sp <= 0){
            throw new EmptyStackException();
        }
        Object value = stack[--sp];
        stack[sp] = null;
        return value;
    } if(sp <= 0){
            throw new EmptyStackException();
        } sp <= 0 sp 0 {
            throw new EmptyStackException();
        } throw new EmptyStackException(); new EmptyStackException() Object value = stack[--sp]; value stack[--sp] stack --sp sp stack[sp] = null stack[sp] stack sp null return value; value public boolean isEmpty(){
        return sp == 0;
    } isEmpty {
        return sp == 0;
    } return sp == 0; sp == 0 sp 0 public String toString(){
        String s = "MyStack=[";
        for(int i = 0; i < sp; i++){
            s = s + stack[i];
            if(i < sp - 1){
                s = s + ",";
            }
        }
        s = s + "]";
        return s;
    } toString {
        String s = "MyStack=[";
        for(int i = 0; i < sp; i++){
            s = s + stack[i];
            if(i < sp - 1){
                s = s + ",";
            }
        }
        s = s + "]";
        return s;
    } String s = "MyStack=["; s "MyStack=[" for(int i = 0; i < sp; i++){
            s = s + stack[i];
            if(i < sp - 1){
                s = s + ",";
            }
        } int i = 0; int i = 0; i 0 i < sp i sp i++ i++ i {
            s = s + stack[i];
            if(i < sp - 1){
                s = s + ",";
            }
        } {
            s = s + stack[i];
            if(i < sp - 1){
                s = s + ",";
            }
        } s = s + stack[i] s s + stack[i] s stack[i] stack i if(i < sp - 1){
                s = s + ",";
            } i < sp - 1 i sp - 1 sp 1 {
                s = s + ",";
            } s = s + "," s s + "," s "," s = s + "]" s s + "]" s "]" return s; s public int size(){
        return this.sp;
    } size {
        return this.sp;
    } return this.sp; this.sp this this.sp public String getTopObjectName(){
        String s = stack[--sp].toString();
        sp++;
        return s;
    } getTopObjectName {
        String s = stack[--sp].toString();
        sp++;
        return s;
    } String s = stack[--sp].toString(); s stack[--sp].toString() stack[--sp].toString stack[--sp] stack --sp sp sp++ sp return s; s public class Main {
    
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt(); 
        List<String> list = new ArrayList<String>();
        MyStack stack = new MyStack();
        
        for(int i = 0; i <= a; i++){
            String x = s.nextLine();
            list.add(x);
        }
        Collections.sort(list);
        stack.push(list.remove(0));
        for(int i = 0; i < list.size(); i++){
            String mo = list.get(i);
            if(mo.length() <= 10 && mo.length() >= 1 && !stack.getTopObjectName().equals(mo)){
                stack.push(mo);
            }
        }
        System.out.println(stack.size()-1);
    }
} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt(); 
        List<String> list = new ArrayList<String>();
        MyStack stack = new MyStack();
        
        for(int i = 0; i <= a; i++){
            String x = s.nextLine();
            list.add(x);
        }
        Collections.sort(list);
        stack.push(list.remove(0));
        for(int i = 0; i < list.size(); i++){
            String mo = list.get(i);
            if(mo.length() <= 10 && mo.length() >= 1 && !stack.getTopObjectName().equals(mo)){
                stack.push(mo);
            }
        }
        System.out.println(stack.size()-1);
    } main {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt(); 
        List<String> list = new ArrayList<String>();
        MyStack stack = new MyStack();
        
        for(int i = 0; i <= a; i++){
            String x = s.nextLine();
            list.add(x);
        }
        Collections.sort(list);
        stack.push(list.remove(0));
        for(int i = 0; i < list.size(); i++){
            String mo = list.get(i);
            if(mo.length() <= 10 && mo.length() >= 1 && !stack.getTopObjectName().equals(mo)){
                stack.push(mo);
            }
        }
        System.out.println(stack.size()-1);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int a = s.nextInt(); a s.nextInt() s.nextInt s List<String> list = new ArrayList<String>(); list new ArrayList<String>() MyStack stack = new MyStack(); stack new MyStack() for(int i = 0; i <= a; i++){
            String x = s.nextLine();
            list.add(x);
        } int i = 0; int i = 0; i 0 i <= a i a i++ i++ i {
            String x = s.nextLine();
            list.add(x);
        } {
            String x = s.nextLine();
            list.add(x);
        } String x = s.nextLine(); x s.nextLine() s.nextLine s list.add(x) list.add list x Collections.sort(list) Collections.sort Collections list stack.push(list.remove(0)) stack.push stack list.remove(0) list.remove list 0 for(int i = 0; i < list.size(); i++){
            String mo = list.get(i);
            if(mo.length() <= 10 && mo.length() >= 1 && !stack.getTopObjectName().equals(mo)){
                stack.push(mo);
            }
        } int i = 0; int i = 0; i 0 i < list.size() i list.size() list.size list i++ i++ i {
            String mo = list.get(i);
            if(mo.length() <= 10 && mo.length() >= 1 && !stack.getTopObjectName().equals(mo)){
                stack.push(mo);
            }
        } {
            String mo = list.get(i);
            if(mo.length() <= 10 && mo.length() >= 1 && !stack.getTopObjectName().equals(mo)){
                stack.push(mo);
            }
        } String mo = list.get(i); mo list.get(i) list.get list i if(mo.length() <= 10 && mo.length() >= 1 && !stack.getTopObjectName().equals(mo)){
                stack.push(mo);
            } mo.length() <= 10 && mo.length() >= 1 && !stack.getTopObjectName().equals(mo) mo.length() <= 10 && mo.length() >= 1 && !stack.getTopObjectName().equals(mo) mo.length() <= 10 mo.length() mo.length mo 10 mo.length() >= 1 mo.length() mo.length mo 1 !stack.getTopObjectName().equals(mo) stack.getTopObjectName().equals(mo) stack.getTopObjectName().equals stack.getTopObjectName() stack.getTopObjectName stack mo {
                stack.push(mo);
            } stack.push(mo) stack.push stack mo System.out.println(stack.size()-1) System.out.println System.out System System.out stack.size()-1 stack.size() stack.size stack 1 String[] args args public class Main {
    
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt(); 
        List<String> list = new ArrayList<String>();
        MyStack stack = new MyStack();
        
        for(int i = 0; i <= a; i++){
            String x = s.nextLine();
            list.add(x);
        }
        Collections.sort(list);
        stack.push(list.remove(0));
        for(int i = 0; i < list.size(); i++){
            String mo = list.get(i);
            if(mo.length() <= 10 && mo.length() >= 1 && !stack.getTopObjectName().equals(mo)){
                stack.push(mo);
            }
        }
        System.out.println(stack.size()-1);
    }
} public class Main {
    
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt(); 
        List<String> list = new ArrayList<String>();
        MyStack stack = new MyStack();
        
        for(int i = 0; i <= a; i++){
            String x = s.nextLine();
            list.add(x);
        }
        Collections.sort(list);
        stack.push(list.remove(0));
        for(int i = 0; i < list.size(); i++){
            String mo = list.get(i);
            if(mo.length() <= 10 && mo.length() >= 1 && !stack.getTopObjectName().equals(mo)){
                stack.push(mo);
            }
        }
        System.out.println(stack.size()-1);
    }
} Main
import java.util.*;
 
class MyStack {
    private Object stack[];
    private int stackSize;
    private int sp;
    private static final int DEFAULT_STACK_SIZE = 300000;
 
    public MyStack(){
        this(DEFAULT_STACK_SIZE);
    }
 
    public MyStack(int size){
        stack = new Object[size];
        stackSize = size;
        sp = 0;
    }
 
    public void clear(){
        Arrays.fill(stack,0,sp,null);
        sp = 0;
    }
 
    public void push(Object x){
        if(sp >= stackSize){
            throw new IllegalStateException("Stack overflow");
        }
        stack[sp++] = x;
    }
 
    public Object pop(){
        if(sp <= 0){
            throw new EmptyStackException();
        }
        Object value = stack[--sp];
        stack[sp] = null;
        return value;
    }
 
    public boolean isEmpty(){
        return sp == 0;
    }
 
    public String toString(){
        String s = "MyStack=[";
        for(int i = 0; i < sp; i++){
            s = s + stack[i];
            if(i < sp - 1){
                s = s + ",";
            }
        }
        s = s + "]";
        return s;
    }
    public int size(){
        return this.sp;
    }
    public String getTopObjectName(){
        String s = stack[--sp].toString();
        sp++;
        return s;
    }
}
public class Main {
    
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt(); 
        List<String> list = new ArrayList<String>();
        MyStack stack = new MyStack();
        
        for(int i = 0; i <= a; i++){
            String x = s.nextLine();
            list.add(x);
        }
        Collections.sort(list);
        stack.push(list.remove(0));
        for(int i = 0; i < list.size(); i++){
            String mo = list.get(i);
            if(mo.length() <= 10 && mo.length() >= 1 && !stack.getTopObjectName().equals(mo)){
                stack.push(mo);
            }
        }
        System.out.println(stack.size()-1);
    }
}