import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;

public class Main {
  public static void main(String[] args)throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = new String[n];
    Set<String> set = new HashSet<>();
    int count = 0;
    for(int i=0; i<n; i++) {
      set.add(in.readLine());
    }
    System.out.println(set.size());
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io import java.util.HashSet; HashSet java.util import java.util.Set; Set java.util public class Main {
  public static void main(String[] args)throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = new String[n];
    Set<String> set = new HashSet<>();
    int count = 0;
    for(int i=0; i<n; i++) {
      set.add(in.readLine());
    }
    System.out.println(set.size());
  }
} Main public static void main(String[] args)throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = new String[n];
    Set<String> set = new HashSet<>();
    int count = 0;
    for(int i=0; i<n; i++) {
      set.add(in.readLine());
    }
    System.out.println(set.size());
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = new String[n];
    Set<String> set = new HashSet<>();
    int count = 0;
    for(int i=0; i<n; i++) {
      set.add(in.readLine());
    }
    System.out.println(set.size());
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(in.readLine()); n Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in String[] str = new String[n]; str new String[n] n Set<String> set = new HashSet<>(); set new HashSet<>() int count = 0; count 0 for(int i=0; i<n; i++) {
      set.add(in.readLine());
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      set.add(in.readLine());
    } {
      set.add(in.readLine());
    } set.add(in.readLine()) set.add set in.readLine() in.readLine in System.out.println(set.size()) System.out.println System.out System System.out set.size() set.size set String[] args args public class Main {
  public static void main(String[] args)throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = new String[n];
    Set<String> set = new HashSet<>();
    int count = 0;
    for(int i=0; i<n; i++) {
      set.add(in.readLine());
    }
    System.out.println(set.size());
  }
} public class Main {
  public static void main(String[] args)throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = new String[n];
    Set<String> set = new HashSet<>();
    int count = 0;
    for(int i=0; i<n; i++) {
      set.add(in.readLine());
    }
    System.out.println(set.size());
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;

public class Main {
  public static void main(String[] args)throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = new String[n];
    Set<String> set = new HashSet<>();
    int count = 0;
    for(int i=0; i<n; i++) {
      set.add(in.readLine());
    }
    System.out.println(set.size());
  }
}