import java.util.Scanner;
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);

        final int kuji_num = s.nextInt();
        final Set<String> itemSet = new HashSet<String>();
        for (int i = 0 ; i <= kuji_num ; i++) {
            itemSet.add(s.nextLine());
        }
        System.out.println(itemSet.size() - 1);
  }
} import java.util.Scanner; Scanner java.util import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);

        final int kuji_num = s.nextInt();
        final Set<String> itemSet = new HashSet<String>();
        for (int i = 0 ; i <= kuji_num ; i++) {
            itemSet.add(s.nextLine());
        }
        System.out.println(itemSet.size() - 1);
  }
} Main public static void main(String[] args) {
    Scanner s = new Scanner(System.in);

        final int kuji_num = s.nextInt();
        final Set<String> itemSet = new HashSet<String>();
        for (int i = 0 ; i <= kuji_num ; i++) {
            itemSet.add(s.nextLine());
        }
        System.out.println(itemSet.size() - 1);
  } main {
    Scanner s = new Scanner(System.in);

        final int kuji_num = s.nextInt();
        final Set<String> itemSet = new HashSet<String>();
        for (int i = 0 ; i <= kuji_num ; i++) {
            itemSet.add(s.nextLine());
        }
        System.out.println(itemSet.size() - 1);
  } Scanner s = new Scanner(System.in); s new Scanner(System.in) final int kuji_num = s.nextInt(); kuji_num s.nextInt() s.nextInt s final Set<String> itemSet = new HashSet<String>(); itemSet new HashSet<String>() for (int i = 0 ; i <= kuji_num ; i++) {
            itemSet.add(s.nextLine());
        } int i = 0 ; int i = 0 ; i 0 i <= kuji_num i kuji_num i++ i++ i {
            itemSet.add(s.nextLine());
        } {
            itemSet.add(s.nextLine());
        } itemSet.add(s.nextLine()) itemSet.add itemSet s.nextLine() s.nextLine s System.out.println(itemSet.size() - 1) System.out.println System.out System System.out itemSet.size() - 1 itemSet.size() itemSet.size itemSet 1 String[] args args public class Main {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);

        final int kuji_num = s.nextInt();
        final Set<String> itemSet = new HashSet<String>();
        for (int i = 0 ; i <= kuji_num ; i++) {
            itemSet.add(s.nextLine());
        }
        System.out.println(itemSet.size() - 1);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);

        final int kuji_num = s.nextInt();
        final Set<String> itemSet = new HashSet<String>();
        for (int i = 0 ; i <= kuji_num ; i++) {
            itemSet.add(s.nextLine());
        }
        System.out.println(itemSet.size() - 1);
  }
} Main
import java.util.Scanner;
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);

        final int kuji_num = s.nextInt();
        final Set<String> itemSet = new HashSet<String>();
        for (int i = 0 ; i <= kuji_num ; i++) {
            itemSet.add(s.nextLine());
        }
        System.out.println(itemSet.size() - 1);
  }
}