import java.util.Scanner;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N=sc.nextInt();
    int Sum=0;
    List<String> listA = new ArrayList<String>();
    for (int i=0;i<N ;i++ ) {
      listA.add(sc.next());

    }
    List<String> listB = listA.stream().distinct().collect(Collectors.toList());


    System.out.println(listB.size());




  }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.stream.Collectors; Collectors java.util.stream class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N=sc.nextInt();
    int Sum=0;
    List<String> listA = new ArrayList<String>();
    for (int i=0;i<N ;i++ ) {
      listA.add(sc.next());

    }
    List<String> listB = listA.stream().distinct().collect(Collectors.toList());


    System.out.println(listB.size());




  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N=sc.nextInt();
    int Sum=0;
    List<String> listA = new ArrayList<String>();
    for (int i=0;i<N ;i++ ) {
      listA.add(sc.next());

    }
    List<String> listB = listA.stream().distinct().collect(Collectors.toList());


    System.out.println(listB.size());




  } main {
    Scanner sc = new Scanner(System.in);
    int N=sc.nextInt();
    int Sum=0;
    List<String> listA = new ArrayList<String>();
    for (int i=0;i<N ;i++ ) {
      listA.add(sc.next());

    }
    List<String> listB = listA.stream().distinct().collect(Collectors.toList());


    System.out.println(listB.size());




  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N=sc.nextInt(); N sc.nextInt() sc.nextInt sc int Sum=0; Sum 0 List<String> listA = new ArrayList<String>(); listA new ArrayList<String>() for (int i=0;i<N ;i++ ) {
      listA.add(sc.next());

    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
      listA.add(sc.next());

    } {
      listA.add(sc.next());

    } listA.add(sc.next()) listA.add listA sc.next() sc.next sc List<String> listB = listA.stream().distinct().collect(Collectors.toList()); listB listA.stream().distinct().collect(Collectors.toList()) listA.stream().distinct().collect listA.stream().distinct() listA.stream().distinct listA.stream() listA.stream listA Collectors.toList() Collectors.toList Collectors System.out.println(listB.size()) System.out.println System.out System System.out listB.size() listB.size listB String[] args args
import java.util.Scanner;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N=sc.nextInt();
    int Sum=0;
    List<String> listA = new ArrayList<String>();
    for (int i=0;i<N ;i++ ) {
      listA.add(sc.next());

    }
    List<String> listB = listA.stream().distinct().collect(Collectors.toList());


    System.out.println(listB.size());




  }
}
