import java.util.Scanner;
import java.util.Set;
import java.util.HashSet;

public class Main {
    public static void main(String[] args) throws Exception{
        Scanner sc = new Scanner(System.in);
        Set<String> s = new HashSet<>();
        while(sc.hasNext()) s.add(sc.next());
        System.out.println(s.size());
    }
}